Skip to content
Kain edited this page Jan 20, 2024 · 14 revisions

subclean

NPM NPM Documentation Maintenance License: MIT

A powerful CLI tool and node module to remove advertising from subtitle files. Made for personal media servers with full support for automation tools like Bazarr. Simple to use and frequently updated with new filters.

Preview

Download

Downloads for Windows, Linux and Mac can be found on the releases page.
Alternatively, you can install using NodeJS:

npm install -g subclean

Or you can build it yourself: npm install && npm run build

Usage

If using Bazarr, please see the wiki page.

Usage: subclean [options]
Example: subclean subtitle.srt -w
Bulk: subclean --sweep "path/to/media"

Options:
  -i, --input      The file you want to clean
  -o, --output     Where to write the cleaned file (defaults to input)
  -w, --overwrite  Overwrite the output file if it already exists
  -c, --clean      Delete the input file before writing the output
  -v, --version    Display current version
  -n, --no-check   Don't check for a new package version
  -s, --silent     Silent mode. Nothing logged to console
      --update     Download the latest filters from GitHub
                   This will not update subclean, only the filters!
      --lang       Force a language filter to be loaded using the 2
                   character ISO 639-1 code. Also used to download
                   filters when using --update

      --sweep      Bulk subtitle cleaning. Searches for subtitles
                   in multiple directories (and sub-directories)
                   This will enable --overwrite!

      --nochains   Attempt to match and remove chained nodes. Experimental.
      --depth      How many sub-directories to look when sweep cleaning
      --debug      Display extra debugging information
      --help       Show the text you're reading now
      --ne         No Empty (nodes). Deletes empty nodes after cleaning.
      --testing    Testing mode. Will not modify files.
      --uf         Use Filter: internal or appdata

🧹 Bulk Cleaning

Scans for subtitle files and cleans them one by one.
Depth is optional. Take a look at the depth map for a visual guide on what depth to use.

subclean --sweep "path/to/media" --depth 5
// or
subclean --sweep

📝 Filters

When you run subclean --update new filters will be downloaded from GitHub. The location of these files may differ depending on what OS you are using. More information in the wiki

👤 Author

This project was made by Kain (ksir.pw)

🤝 Contributing

Contributions, issues and feature requests are welcome and greatly appreciated.
Feel free to check issues page.

Show your support

Please give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Kain (ksir.pw). This project is MIT licensed.

Clone this wiki locally