2.0.2 • Published 12 months ago

subtitle-tools v2.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
12 months ago

Subtitle Tools

Tools for managing subtitle files in command line.

Usage:

  1. Install using npm install -g subtitle-tools
  2. 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.ass

Those are the line collision handling modes:

  • Overlap (default) just disables checking, leave the renderer to handle it.
  • KeepFirst keep lines from first files on collisions, remove the rest.
  • ChangeAlignment move overlapping lines above, remove if they were already there.
  • ChangeStyle changes style to ${style}_overlap on collisions, remove if the style does not exist.

Those are the style collision handling modes:

  • Rename (default) renames styles on collisions
  • KeepFirst keep the first style on collisions.
  • KeepLast keep the last style on collisions

Those are the layer handling modes:

  • Unchanged (default) layers are not changed on collisions.
  • FirstAbove keep the first line above on collisions.
  • LastAbove keep 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:italic

Notes:

  • Only ASS v4.00+ files are supported, as it uses ass-parser.
  • You can use --help do 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.
2.0.2

12 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

7 years ago