Open pietrop opened 5 years ago
Code is at https://github.com/chetan-prime/subfixer and it's written in Golang
$ ./subfixer9
./subfixer9: Available parameters are below
-chars_per_line int
Perfection Check - No. of characters/line (default 42)
-expand_closer_than float
Expand two subtitles closer than n seconds (default 0.5)
-file string
Subtitle Input File (Required)
-forbidden_chars string
Perfection Check - Forbidden Characters (default "{./;/!/?/,:}")
-join_shorter_than int
Join two lines shorter in length than (default 42)
-limit_to string
Limit to range or list of subtitle id's (1-2,4-10,14-16,18)
-line_balance float
Perfection Check - Length Balance (%) (default 50)
-max_lines int
Perfection Check - Max. lines (default 2)
-min_length float
Minimum Length for each subtitle (default 1)
-mode string
Operation Mode (normal/perfection) (default "normal")
-newlines_as_chars
Perfection Check - Treat newlines as characters
-prefer_compact
Perfection Check - Prefer Compact Subtitles (default true)
-reading_speed float
Perfection Check - Reading Speed (ch/sec) (default 21)
-shrink_longer_than float
Shrink a single line subtitle longer than n seconds (default 7)
-spaces_as_chars
Perfection Check - Treat Spaces as characters (default true)
-speed float
Desired Characters Per Second (default 21)
-speed_epsilon float
Epsilon in % of Speed value (default 1)
-split_longer_than float
Proportionately split a two line subtitle longer than n seconds (default 7)
-trim_spaces int
Trim space to left & right of each subtitle (default 1)
Is your feature request related to a problem? Please describe.
A way to automatically adjust/fix subtitles to be more in line with TED guidelines.
Describe the solution you'd like
A checkbox, on by default, that runs a separate function to provide a second pass to add those fixes programmatically.
Describe alternatives you've considered
NA
Additional context
subfixer9
executable that provides those changes. which can be used as./subfixer9 -file TestFile.srt 20.999 -speed_epsilon 0.5
however it be good to look a the code, and see if this can be brought into the app as a node/js module, to keep consistency with the rest of the project.Request by Michele Gianella