Manages honorifics and timing quirks in subtitles.
Scripts can run by in-system Python. All scripts reads from stdin and output to stdout.
Read line by line. If in line is text between marks {*}...{*...} then swap it. Marks can be changed by providing arguments to class TextSwapperInMark constructor in script.
For SubStation Alfa (V4 & V4+) file. Optional argument: -fps
Read all input once as lines.
If in dialogue event line at the end of Text field is {+|- number cs|ms|frame|frames}
e.g. {+5 frames}
then shift accordingly Start and End time field.
Default frame rate is 23.976.
For video files. Optional arguments -duration, -deband, -subtitles, -output
Script adds visual effects on given timestamps and durations, and changes codec to VP9 with .mkv extension. Optionally script hardsubs given subtitle file to the video.
python3 ./scripts/subtitles.py < input > output
python3 ./scripts/timing_offset.py -fps 29.97 < input.ass > output.ass
python3 ./scripts/changing_codec.py -i input [timestamp] -d [duration] -o output.mkv
For developing purposes it is recommended to use virtual environments.
Code in honorifics/
should be covered by tests. Type hinting is preferred. PEP 8 to style.