CLI tool to filter subtitle files.
```
subfilter [FLAGS] [OPTIONS]
FLAGS: -h, --help Prints help information --hide-time -V, --version Prints version information
OPTIONS:
-A, --after-context
--post-replace-with <post-replace-with>
Replacement string after pattern matching (see https://docs.rs/regex/1.3.7/regex/)
--pre-replace-pattern <pre-replace-pattern>
Pattern to replace before pattern matching (see https://docs.rs/regex/1.3.7/regex/)
--pre-replace-with <pre-replace-with>
Replacement string before pattern matching (see https://docs.rs/regex/1.3.7/regex/)
-i, --sep-interval <separation-interval-ms>
Separate blocks if next timecode is later by an offset of this value in milliseconds [default: 5000]
ARGS:
Print all lines containing "hello"
subfilter subs.srt hello
Print all lines containing "hello" or "hi"
subfilter subs.ass "(hello|hi")"
Print all lines containing "hello" with the previous line and the next one as context.
subfilter -A 10 -B 1 subs.ass hello
Print all lines containing "hello world" but apply a match and replace regex before to strip html tags.
That way, <span>hello</span> world
is also matched by the filtering pattern.
subfilter --pre-replace-pattern="<\s*[\.a-zA-Z]+[^>]*>(.*?)<\s*/\s*[\.a-zA-Z]+>" --pre-replace-with="\$1" subs.ass "hello world"
Print all lines containing "hello world" but replace "hello" by "hi".
subfilter --post-replace-pattern="hello" --post-replace-with="hi" subs.srt "hello world"
$ cargo install subfilter