ass-styles
Extract styles from SSA/ASS subtitles, edit & save back.
Example
var parse = ;var getStyles = ;var stringify = ; var subtitle = fs;var ass = ;var styles = ; stylesDefaultMarginV = 335;stylesDefaultFontsize = NumberrestylerDefaultFontsize + 10; console;
API
styles = assStyles(ass)
ass
- subtitle in the ass-parser format.
Returns the object containing all the styles from all the styling sections.
styles[style]
references the original parse tree node, so editing is fully supported.
styles[style][attribute]
is a value of the attribute in the specific style. It is usually a string and should always be expected to be a string.
However, you can't add a new style or erase an existing one, but why would you?
References
Related
- ass-restyler - command line utility for changing SSA/ASS styles.
- ass-parser - SSA/ASS parser.
- ass-stringify - stringify SSA/ASS parse tree.
Install
npm install ass-styles
License
MIT