SRT-LINES-MATCHING(1)

πŸ“¦
version 3.5.3 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing

🌸 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 returning False. 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