Skip to main content

A command-line utility for organizing media files.

Project description

PyPI Tests Coverage Licence Style: Black

mnamer

mnamer (media renamer) is an intelligent and highly configurable media organization utility. It parses media filenames for metadata, searches the web to fill in the blanks, and then renames and moves them.

Currently it has integration support with TVDb and TvMaze for television episodes and TMDb and OMDb for movies.

Documentation

Check out the wiki page for more details.

💾 Installation

$ pip3 install --user mnamer

🤖 Automation

$ docker pull jkwill87/mnamer

✍️ Formatting

Using the episode-directory, episode-format, movie-directory, or movie-format settings you customize how your files are renamed. Variables wrapped in braces {} get substituted with of parsed values of template field variables.

🌐 Internationalization

Language is supported by the default TMDb and TVDb providers. You can use the --language setting to set the language used for templating.

mnamer also supports subtitle files (.srt, .idx, .sub). It will use the format pattern used for movie or episode media files with its extension prefixed by its 2-letter language code.

🧰 Settings

USAGE: mnamer [preferences] [directives] target [targets ...]

POSITIONAL:
  [TARGET,...]: media file file path(s) to process

PARAMETERS:
  The following flags can be used to customize mnamer's behaviour. Their long
  forms may also be set in a '.mnamer-v2.json' config file, in which case cli
  arguments will take precedence.

  -b, --batch: process automatically without interactive prompts
  -l, --lower: rename files using lowercase characters
  -r, --recurse: search for files within nested directories
  -s, --scene: use dots in place of alphanumeric chars
  -v, --verbose: increase output verbosity
  --hits=<NUMBER>: limit the maximum number of hits for each query
  --ignore=<PATTERN,...>: ignore files matching these regular expressions
  --language=<LANG>: specify the search language
  --mask=<EXTENSION,...>: only process given file types
  --no-guess: disable best guess; e.g. when no matches or network down
  --no-overwrite: prevent relocation if it would overwrite a file
  --no-style: print to stdout without using colour or unicode chars
  --movie-api={*tmdb,omdb}: set movie api provider
  --movie-directory: set movie relocation directory
  --movie-format: set movie renaming format specification
  --episode-api={tvdb,*tvmaze}: set episode api provider
  --episode-directory: set episode relocation directory
  --episode-format: set episode renaming format specification

DIRECTIVES:
  Directives are one-off arguments that are used to perform secondary tasks
  like overriding media detection. They can't be used in '.mnamer-v2.json'.

  -V, --version: display the running mnamer version number
  --clear-cache: clear request cache
  --config-dump: prints current config JSON to stdout then exits
  --config-ignore: skips loading config file for session
  --config-path=<PATH>: specifies configuration path to load
  --id-imdb=<ID>: specify an IMDb movie id override
  --id-tmdb=<ID>: specify a TMDb movie id override
  --id-tvdb=<ID>: specify a TVDb series id override
  --id-tvmaze=<ID>: specify a TvMaze series id override
  --no-cache: disable request cache
  --media={movie,episode}: override media detection
  --test: mocks the renaming and moving of files

Parameters can either by entered as command line arguments or from a config file named .mnamer-v2.json.

Contributions

Community contributions are a welcome addition to the project. In order to be merged upsteam any additions will need to be formatted with black for consistency with the rest of the project and pass the continuous integration tests run against each PR. Before introducing any major features or changes to the configuration api please consider opening an issue to outline your proposal.

Bug reports are also welcome on the issue page. Please include any generated crash reports if applicable. Feature requests are welcome but consider checking out if it is in the works first to avoid duplication.

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

mnamer-2.5.5.dev57.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

mnamer-2.5.5.dev57-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file mnamer-2.5.5.dev57.tar.gz.

File metadata

  • Download URL: mnamer-2.5.5.dev57.tar.gz
  • Upload date:
  • Size: 5.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for mnamer-2.5.5.dev57.tar.gz
Algorithm Hash digest
SHA256 36c07637342c4e0d20818fb40382c09736c403e3967e51cce852aea55ef3c978
MD5 3bf4fdf95bad76072d027d68b26e2fde
BLAKE2b-256 3b43a00f606e7e89df45cbb6229accc4c47f78b0f697d8f10878287ef9d6c39a

See more details on using hashes here.

File details

Details for the file mnamer-2.5.5.dev57-py3-none-any.whl.

File metadata

  • Download URL: mnamer-2.5.5.dev57-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for mnamer-2.5.5.dev57-py3-none-any.whl
Algorithm Hash digest
SHA256 224075a4d779b6f652002840e5207286529e5aa705737e04e5e78ec08c60d998
MD5 94c1682571da5c1820cf7aceb4aac17b
BLAKE2b-256 a212661ec6318d873534ccbd94e1369c0bd212070ce6f2f8204ab37dfef25b22

See more details on using hashes here.

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