SRT-PROCESS(1)

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

✨ NAME ✨

srt-process β€” the SRT subtitle processing tool πŸŽ€


πŸ’… DESCRIPTION πŸ’…

okay bestie so first things first, here's the whole invocation vibe:

usage: srt process [-h] [--input FILE] [--output FILE] [--inplace]
       [--no-strict] [--debug] [--ignore-parsing-errors] [--encoding
       ENCODING] -f FUNC [-m MODULE]

Process subtitle text content using arbitrary Python code. yes literally, you get to run your own Python on it. main character energy fr fr πŸ¦‹

🌸 options:

  • -h, --help β€” show this help message and exit. the classic, the icon, the one you always run first πŸ’–
  • --input FILE, -i FILE β€” the file to process (default: stdin). give it a file or it just reads whatever you pipe in, no thoughts head empty 🌈
  • --output FILE, -o FILE β€” the file to write to (default: stdout) ✨
  • --inplace, -p β€” modify file in place. it edits the file right there, no copy left behind, be brave πŸ’…
  • --no-strict β€” allow blank lines in output. your media player may explode πŸ’€ like that's the actual warning, don't say nobody told you
  • --debug β€” enable debug logging. turn it on when you want to see everything πŸ‘€
  • --ignore-parsing-errors, -c β€” try to keep going, even if there are parsing errors. it's giving resilience 🫢
  • --encoding ENCODING, -e ENCODING β€” the encoding to read/write files in (default: utf8) πŸ“
  • -f FUNC, --func FUNC β€” a function to use to process lines. this one is required btw, no func no party πŸŽ€
  • -m MODULE, --module MODULE β€” modules to import in the function context. so your func actually has stuff to work with πŸ“¦

🧚 examples:

Strip HTML-like symbols from a subtitle 😭

$ srt process -m re -f 'lambda sub: re.sub("<[^<]+?>", "", sub)'

look at that lambda go, ate and left no crumbs πŸ‘‘


and that's the whole page bestie!! this was srt-process version 3.5.3, dated June 2023 β€” periodt, go process some subtitles πŸ’œ

πŸ“¦ where this page comes from