Metadata-Version: 2.4
Name: nudebomb
Version: 0.4.9
Summary: Strip unused languages from mkv files en mass
Keywords: audio,mkv,movie,srt,subtitles,video
Author: AJ Slater
Author-email: AJ Slater <aj@slater.net>
License-Expression: GPL-3.0-only
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Multimedia :: Video :: Conversion
Requires-Dist: confuse~=2.1.0,<2.2.0
Requires-Dist: pycountry~=26.2
Requires-Dist: python-dateutil~=2.8
Requires-Dist: ruamel-yaml>=0.18,<1.0
Requires-Dist: treestamps~=2.3
Requires-Dist: typing-extensions~=4.13
Requires-Python: >=3.10
Project-URL: Documentation, https://nudebomb.readthedocs.io/news/
Project-URL: News, https://nudebomb.readthedocs.io/
Project-URL: Issues, https://github.com/ajslater/nudebomb/issues
Project-URL: Source, https://github.com/ajslater/nudebomb
Description-Content-Type: text/markdown

# Nudebomb

The Nudebomb recursively strips matroska media files of unwanted audio and
subtitle tracks.

## 📰 News

You may find user focused nudebomb changes in the
[NEWS file](https://github.com/ajslater/nudebomb/tree/NEWS.md).

## 🕸️ HTML Docs

[HTML formatted docs are available here](https://nudebomb.readthedocs.io)

## 📦 Installation

### Requirements

- [MKVToolNix](https://mkvtoolnix.download/)

Widely available via homebrew, apt or your favorite package manager..

### Install

```sh
pip install nudebomb
```

## ⌨️ Use

### Posix

Strip languages that are not English and French from an entire directory tree:

```sh
nudebomb -rl eng,fre /mnt/movies
```

Show possible stripping actions on a single movie without doing anything:

```sh
nudebomb -dvvl eng movie.mkv
```

```txt
Stripping languages except eng, und.
Searching for MKV files to process:
Checking movie.mkv
    audio: 1 eng
    audio: 2 eng
    audio: 3 eng
    subtitles: 4 eng
    subtitles: 5 eng
    Already stripped movie.mkv
done.
```

### Windows

```powershell
nudebomb -b C:\\Program/ Files\MKVToolNix\mkvmerge.exe -rl eng,jap \\nas\movies
```

## 🎛️ Configuration

You may configure Nudebomb options via the command, a yaml config file and
environment variables.

### Environment variable format

Prefix environment variables with `NUDEBOMB_NUDEBOMB__` and enumerate lists
elements:

```sh
NUDEBOMB_NUDEBOMB__RECURSE=True
NUDEBOMB_NUDEBOMB__LANGUAGES__0=und
NUDEBOMB_NUDEBOMB__LANGUAGES__1=eng
```

## ⌨️ Lang Files

While you may have a primary language, you probably want videos from other
countries to keep their native language as well. Lang files let you do this.

Lang files are persistent files on disk that nudebomb parses to keep to all
languages in them in the mkvs in the current directory and all mkvs in sub
directories.

Valid lang file names are: 'lang', 'langs', '.lang', or '.langs' They include
comma separated list of languages to keep like the `-l` option.

e.g. You may have an entire collection of different TV shows with a root lang
file containing the `eng` language. Under that directory you may have a specific
TV show directory with lang file containing `jpn`. All mkvs in season
directories under that would then keep both the `eng` and `jpn` languages, while
other TV shows would keep only `eng` languages.

For each mkv file, nudebomb looks up the directory tree for each parent lang
file and uses the union of all languages found to determine what languages to
keep.

### APIs

Langfiles would be obsolete if nudebomb could determine native languages for mkv
files by polling and caching results from major online media databases. It's the
right thing to do, but I don't care to implement it. Patches or forks welcome.

## 💡 Inspiration

Nudebomb is a radical fork of [mkvstrip](https://github.com/willforde/mkvstrip).
It adds recursion, lang files, timestamps and more configuration to mkvstrip and
fixes some minor bugs.

## 🛠️ Development

Nudebomb code is hosted at [Github](https://github.com/ajslater/nudebomb)
