Skip to main content

Remove advertising from subtitle files

Project description

About

This script is intended to scan subtitle files (or folders containing subtitle files) and prompt to remove cells with advertising. Subtitle files may be searched via regular expression or plaintext. The script can handle srt subtitle files natively or other formats (ass, srt, ssa, sub) via the Python module aeidon.

Installation

pip3 install subnuker

The subnuker package is known to be compatible with Python 3.

Subnuker can process srt subtitle files right out of the box. If you wish to handle other types of subtitle files (ass, srt, ssa, sub), you’ll need to install the aeidon module.

On Debian/Ubuntu, try:

sudo apt-get install python3-aeidon

Or download the tarball for Gaupol. After unpacking, run:

python3 setup.py --user --without-gaupol clean install

Additional information on installing Gaupol is available here:

https://github.com/otsaloma/gaupol/blob/master/README.aeidon.md

Usage

From the command line, run subnuker --help to display available options.

You may scan srt subtitle files with or without the regex flag, though there are likely to be less false positives with regex:

subnuker --regex FILE1.srt FILE2.srt FILE3.srt

Or scan entire folders containing srt subtitle files:

subnuker FOLDER1 FOLDER2 FOLDER3

By default, subnuker scans subtitles with a built-in list of plaintext search terms or regular expression. Subnuker can also obtain patterns from multiple pattern files, similar to grep’s --file option.

subnuker --file PATTERNFILE FILE.srt

The --aeidon option indicates the use of the aeidon module. The aeidon module has full support for all options:

subnuker --aeidon FILE.srt

License

Copyright (c) 2015 Six (brbsix@gmail.com).

Licensed under the GPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subnuker-0.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

subnuker-0.2-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page