Scroll to navigation

SRT-LINES-MATCHING(1) User Commands SRT-LINES-MATCHING(1)

NAME

srt-lines-matching - SRT subtitle processing tool

DESCRIPTION

usage: srt lines-matching [-h] [--input FILE] [--output FILE] [--inplace]

[--no-strict] [--debug] [--ignore-parsing-errors]
[--encoding ENCODING] -f FUNC [-m MODULE] [-s] [-v]

Filter subtitles that match or don't match a particular pattern.

options:

show this help message and exit
the file to process (default: stdin)
the file to write to (default: stdout)
modify file in place
allow blank lines in output, your media player may explode
enable debug logging
try to keep going, even if there are parsing errors
the encoding to read/write files in (default: utf8)
a function to use to match lines
modules to import in the function context
match the content of each subtitle, not each line
invert matching -- only match lines returning False

examples:

Only include Chinese lines
$ srt lines-matching -m hanzidentifier -f hanzidentifier.has_chinese
Exclude all lines which only contain numbers
$ srt lines-matching -v -f 'lambda x: x.isdigit()'
December 2022 srt-lines-matching 3.5.2