subclean

A cross-platform CLI tool and node module to remove advertising from subtitles. Supports Bazarr and bulk cleaning!

MIT License

Downloads
76
Stars
54
Committers
4

Bot releases are hidden (Show)

subclean - 1.8.1 Latest Release

Published by DrKain 5 months ago

Fixed some filters being loaded late (#36)

subclean - 1.8.0 - NM bug fixes

Published by DrKain 9 months ago

This release contains bug fixes for the node module ONLY, this means changes in the code that do not apply to most users. If you are using the binary/downloaded files you do not need to update.
If you want to download new filters you can simply run subclean --update.

subclean - 1.7.1

Published by DrKain 9 months ago

  • Fixed a minor bug that prevented parsing and processing files with bad spacing
  • A few new filters for the main category

Don't forget that you need to run subclean --update to download the updated filters. Most releases here are for bug fixes or better file handling.

subclean - 1.7.0 - Major bug fix

Published by DrKain 9 months ago

Fixes a serious bug where non-english characters were being incorrectly decoded, breaking valid subtitles. I highly recommend you upgrade asap. More details can be found in issue #33 and commit (https://github.com/DrKain/subclean/commit/b4fd0087af11832cde0151266bfeb0a270ba62e2)
If anyone has more problems please open a new issue asap and I'll handle it as quickly as I can.

subclean - v1.6.3

Published by DrKain 9 months ago

Added node module support
Fixed several minor bugs
Updated encoding handler to allow customization via the --encodefile parameters
Thanks @jaruba for helping with this one

subclean - 1.6.1

Published by DrKain 9 months ago

Fixes character encodings for issues like #33. Tested with several local files but if you come across this issue again please open another issue so I can take a look.

subclean - 1.5.3

Published by DrKain about 1 year ago

Minor bug fixes, extra logging

subclean - 1.5.1 - Support for other languages

Published by DrKain over 1 year ago

Thanks @winterborn for doing most of the work here.

Downloading/updating filters

To download filters for a specific language use --update --lang=de, in this case de being the 2 character ISO 639-1 language code.
Once a filter has been downloaded it will automatically be updated when using --update. If a filter fails to update because of a 404 error the file will be deleted.

Cleaning subtitles

When cleaning the language code will be extracted from the file name. If your file is subtitle.de.srt then de-main will be loaded along with main. If you would like to force a language file to be used, you can specify using the --lang parameter.
For example: subclean subtitle.srt --lang=de. Once more filters have been added you will be able to pass multiple language codes at once, for example: --lang=en,de,ja.
If a language code is invalid it will be ignored.

Contributing

The filters rely entirely on user contributions, if you find ads in your subtitle files please report them on GitHub so other users can benefit from the new filters. Right now I'm adding new filters as I find them so I would appreciate all the help with other languages.

subclean - 1.5.0 - Support for chained nodes

Published by DrKain about 2 years ago

This is an experimental feature that can be used with the --nochains parameter. See issue #4 for more information on what this does.

What's Changed

New Contributors

Full Changelog: https://github.com/DrKain/subclean/compare/v.1.4.1...v1.5.0

subclean - 1.4.1 - Minor bug fixes

Published by DrKain over 2 years ago

If you are using 1.4.0 you do not need to update to 1.4.1
These are minor changes that focus around the --debug parameter. You can still use subclean --update to grab the new filter.

What's Changed?

  • Added uf parameter. Use either appdata or internal to tell subclean what filters to load
  • Removed console.time as this is unsupported when using binaries
  • Updated 1 filter
  • The appdata path will now be logged when using --debug
  • Modified multiple other log lines for more information
  • Some lines will not be logged when nothing was changed, for example Removed empty nodes: ...
subclean - v1.4.0

Published by DrKain over 2 years ago

What's Changed

⚠️ This update changes 40+ filters and will not be compatible with older versions of subclean.

Assuming there are no bugs that need fixing this will be the last code update in a while. If you are using an older version of subclean please update to 1.4.0! I will continue to update the filters as I find them.


  • Converted 40 filters into 18 regex filters to optimize cleaning
  • Much more information is logged when using --debug
  • Added --ne (no-empty). This will delete empty nodes instead of blanking them
  • Added --testing. When this is enabled the file will not be modified but everything else will be logged.
  • When using --debug a latest.log file will be created in the app data location, this contains the output of the last clean.
  • App data folders are validated before cleaning to prevent errors
  • When using --debug, internal filters will be used instead of downloaded filters.
  • 1.4.0 in https://github.com/DrKain/subclean/pull/19

Full Changelog: https://github.com/DrKain/subclean/compare/v.1.3.5...v1.4.0

subclean - v1.3.5

Published by DrKain over 2 years ago

This is a minor update that fixes one bug and optimizes multiple filters. You can simply use --update to download the new filters. You do not need to download this version.

What's Changed

  • Modified several domain filters for better matching by removing the TLD as they were unlikely to appear in any dialogue.
  • Moved several users from main.json to users.json.
  • Filters will be de-duped during sorting. Thanks co-pilot for suggesting this.
  • Fixed an incorrect directory target.
  • Added 2 filters.

Full Changelog: https://github.com/DrKain/subclean/compare/v.1.3.4...v.1.3.5

subclean - 1.3.4

Published by DrKain over 2 years ago

What's Changed

If you are using 1.3.2+ you can simply use subclean --update to download the new filters. This version exists for the change made in #16

Full Changelog: https://github.com/DrKain/subclean/compare/v1.3.2...v.1.3.4

subclean - 1.3.2

Published by DrKain almost 3 years ago

What's Changed

Simply run subclean --update to download new filters from GitHub.

Full Changelog: https://github.com/DrKain/subclean/compare/v1.3.1...v1.3.2

subclean - 1.3.1

Published by DrKain almost 3 years ago

  • 5 new filters
  • Minor code cleanup
  • Build script updated
  • Filter lists are now sorted

The next version will include the ability to download filters through the command line instead of having to download subclean very version.
I'm using this tool too, so it's inconvenient for me also 🌧️
You'll also be able to use your own filters when this feature rolls out

Full Changelog: https://github.com/DrKain/subclean/compare/v1.3.0...v1.3.1

subclean - 1.3.0

Published by DrKain almost 3 years ago

Finally closes #9!

Preview Image

1

Developer notes

I've changed how files are cleaned by introducing a queue system. When using the --sweep "path/to/media" command, subclean will recursively search through sub-directories looking for subtitle files.

You can use the --depth n to limit how deep subclean will look. This has a hard limit of 25.

When all files have been added to the queue, the cleaning will begin one by one. Each subtitle file should take 1/4th of a second at most, even with 100+ filters.

Better error handling should make things run a bit smoother.

Warning

Using the --sweep argument will enable --overwrite!
This is because there's no dynamic naming system set up. You can still use --output for single files, but when using sweep it will be ignored.

If you encounter any issues, please open an issue on GitHub.

Full Changelog: https://github.com/DrKain/subclean/compare/v1.2.7...v1.3.0

subclean - 1.2.7

Published by DrKain almost 3 years ago

Fixes #7 where \r would break the parser resulting in a failed clean

Full Changelog: https://github.com/DrKain/subclean/compare/v1.2.6...v1.2.7

subclean - 1.2.6

Published by DrKain about 3 years ago

Minor update. Just 3 new filters I discovered when re-watching Kingdom.

Full Changelog: https://github.com/DrKain/subclean/compare/v1.2.5...v1.2.6

subclean - 1.2.5

Published by DrKain about 3 years ago

  • Fixed an issue where update-notifier would check for an update when --no-check was used.
  • 1 main filter
  • Bump normalize-url from 4.5.0 to 4.5.1
subclean - 1.2.4

Published by DrKain over 3 years ago

Not many new filters this release. The current filters remove nearly all advertising so far, it's mostly just domains being added now.
I'll continue to add new filters as I discover them.
Some code optimization is in the works too.

Added:

  • Lint file for development
  • 7 default filters
  • 2 user filters
Package Rankings
Top 19.04% on Npmjs.org
Badges
Extracted from project README
subclean NPM NPM Documentation Maintenance License: MIT