Skip to content

Filters

Kain edited this page Jan 20, 2024 · 6 revisions

subclean

NPM NPM Documentation Maintenance License: MIT

Currently this tool uses two filters: main and users.
These two are combined and loaded by default each time subclean is run, the split files are for readability and organization.

All filters must be lowercase.

Updates

As of 1.3.2 you can simply run subclean --update to download the latest filters from GitHub. You do not need to re-download subclean again.
Please keep in mind this will update the filters only.
You will only be notified of an update when the binaries have changed, this means you need to visit GitHub and download the latest version to access the new feasures/bug fixes.

Regex

Subclean has very basic regex support. I wanted to avoid this as much as possible to prevent slow, intensive cleaning.
If you start a filter with a caret (^) the filter will use regex to match a node instead of raw text.
For example ^subtitles by will match the line Subtitles by DrKain but not Who were the subtitles by?. This is because the second example could be a legitimate line by a character in a movie or episode.

Main

The main filter is used to find links, websites, brands and sometimes phrases that are considered advertising.
This filter must be careful to avoid false matches. For example Fixed by is not allowed because it's a common phrase.
If a subtitle node matches any of these filters the entire node will be deleted, ruining potentially legitimate subtitles.

Users

The users filter functions the same as the main filter, but it's limited to usernames that would otherwise not be matched by the main filter.
For example: Fixed by SomePerson42 would not be matched by the main filter because Fixed by would conflict with legitimate subtitles. Instead someperson42 would go into the Users filter matching them by the username.

Custom

You can use your own custom filters as of v1.3.2.
Please visit the app data page to see how.

Clone this wiki locally