SRT-LINES-MATCHING(1)
πΈ SRT-LINES-MATCHING(1) πΈ
okay bestie, welcome to the srt-lines-matching manual β a User Commands situation, and honestly? it's giving subtitle-filtering royalty. π
β¨ NAME β¨
srt-lines-matching β an SRT subtitle processing tool π
π DESCRIPTION π
so basically, here's the vibe:
usage: srt lines-matching [-h] [--input FILE] [--output FILE] [--inplace]
[--no-strict] [--debug] [--ignore-parsing-errors]
[--encoding ENCODING] -f FUNC [-m MODULE] [-s] [-v]
what it does: filters subtitles that match β or don't match β a particular pattern. that's the whole main character energy right there. π¦
π options: π
-h,--helpβ shows this help message and dips. no cap. β¨--input FILE,-i FILEβ the file to process (default:stdin)--output FILE,-o FILEβ the file to write to (default:stdout)--inplace,-pβ modify file in place. lowkey powerful, highkey irreversible, so likeβ¦ be aware. π--no-strictβ allow blank lines in output. and, um, your media player may explode. their words, not mine. π--debugβ enable debug logging π--ignore-parsing-errors,-cβ try to keep going, even if there are parsing errors. resilience queen. π«Ά--encoding ENCODING,-e ENCODINGβ the encoding to read/write files in (default:utf8)-f FUNC,--func FUNCβ a function to use to match lines β-m MODULE,--module MODULEβ modules to import in the function context π¦-s,--per-subtitleβ match the content of each subtitle, not each line. whole-subtitle energy. π-v,--invertβ invert matching β only match lines returningFalse. yes, we're doing the opposite. iconic. π₯
π 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()'
reminder bestie: -f FUNC is not optional, fr fr. it's the whole point. π«Ά
and that's the page!! this was srt-lines-matching 3.5.3, from June 2023 β written up in SRT-LINES-MATCHING(1), user commands division. ty for reading, ily, go filter some subtitles. πβ¨π
π¦ where this page comes from
- debian trixie: python3-srt 3.5.3-1 Β· MIT
- ubuntu noble: python3-srt 3.5.3-1 Β· MIT
- ubuntu questing: python3-srt 3.5.3-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms