/pysdhstrip

Intelligent SDH stripper for SRT subtitles

Primary LanguagePython

pysdhstrip

Intelligent SDH/HI removal tool removal tool for SRT subtitles.

Installation

  • PyPI: pip install pysdhstrip
  • From source: pdm install

Usage

Python

import pysdhstrip

with open("input.srt", encoding="utf-8") as fd:
    subtitles = fd.read()

stripped = pysdhstrip.strip(subtitles)

with open("output.srt", "w", encoding="utf-8") as fd:
    fd.write(stripped)

CLI

Needs to be installed via pip install "pysdhstrip[cli]" or pdm install --group cli.

$ pysdhstrip input.srt -o output.srt
$ pysdhstrip input.srt  # Output to stdout
$ pysdhstrip -w input.srt  # Overwrite input file