2.0.2 • Published 2 years ago
subtitle-tools v2.0.2
Subtitle Tools
Tools for managing subtitle files in command line.
Usage:
- Install using
npm install -g subtitle-tools - Run commands using
subtitle-tools [command...]
Commands:
merge
Merge two or more subtitle files. Set output using --output or -o.
# Example:
> subtitle-tools merge ep01.ass op.ass ed.ass -o ep01-final.assThose are the line collision handling modes:
Overlap(default) just disables checking, leave the renderer to handle it.KeepFirstkeep lines from first files on collisions, remove the rest.ChangeAlignmentmove overlapping lines above, remove if they were already there.ChangeStylechanges style to${style}_overlapon collisions, remove if the style does not exist.
Those are the style collision handling modes:
Rename(default) renames styles on collisionsKeepFirstkeep the first style on collisions.KeepLastkeep the last style on collisions
Those are the layer handling modes:
Unchanged(default) layers are not changed on collisions.FirstAbovekeep the first line above on collisions.LastAbovekeep the last line above on collisions.
Metadata sections such as Script Info and Aegisub Project Garbage are not merged by default. You can enable it with --merge-metadata.
If subtitle files have different resolutions all subtitles will be resampled to use the first subtitle resolution.
list-fonts
List fonts and their variants used in one or more files.
# Example:
> subtitle-tools list-fonts op.ass ep01.ass ed.ass
Font A
Font A:bold
Font B
Font B:italic
Font C:bold:italicNotes:
- Only ASS v4.00+ files are supported, as it uses ass-parser.
- You can use
--helpdo get more info about each command arguments. - For programmatic use check functions defined in lib/utils.js.
- Subtitle resampling code was loosely translated from C++ using arch1t3cht/Aegisub's code as reference.