Coder Social home page Coder Social logo

mnamer's Introduction

pypi travis_ci coverage licence code style black

mnamer logo

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.

demo

Installation

Stable Version

$ pip install mnamer

Development Version

$ pip install https://github.com/jkwill87/mnamer/archive/develop.zip

Notes

If you want to install it using system python (e.g. the one that comes with your OS, not really recommended) and get a permission error you need to use either sudo -H pip ... or pip install --user ....

Usage

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

Preferences

mnamer attempts to load preferences from .mnamer.json in the user's home directory, the current working directory, and then in each directory up the drive towards the drive root (e.g. C:/, /).

Preference Arguments Description
-b, --batch batch mode; disables interactive prompts
-s, --scene scene mode; replace non ascii-alphanumerics with .
-r, --recurse show this help message and exit
-v, --verbose increases output verbosity
--blacklist pattern ignore files including these words
--hits number limits the maximum number of hits for each query
--extmask extention(s) define the extension mask used by the the file parser
--nocache disables and clears result cache
--nostyle disables colours and uses ASCII chars for UI prompts
--movie_api imdb or tmdb set movie api provider
--movie_directory path set movie relocation directory
--movie_template template set movie renaming template
--television_api tvdb set television api provider
--television_directory path set television relocation directory
--television_template template set television renaming template

Directives

Whereas preferences configure how mnamer works, directives are one-off parameters that are used to perform secondary tasks like exporting the current option set to a file.

Option Arguments Description
--config path prints config JSON to stdout then exits
--id id explicitly specify movie or series id
--media movie or television override media detection
--test mocks the renaming and moving of files

Templating

You have complete control of how media files are renamed using mnamer's template options:

  • you can use templating with the following options: television_directory, television_template, movie_directory, movie_template
  • metadata fields prefixed with a sigil $ found inside angle brackets with the result of a match
  • any leading or trailing whitespace will be trimmed
  • if a field can't be matched, the entire contents of the bracket are disregared

Examples

SxE Episodes Format
  • television_template: <$series - >< - $seasonx><$episode - >< - $title><$extension>
  • target: ~/Downloads/Rick.and.Morty.S02E01.WEBRip.x264-RARBG.mp4
  • result: ~/Downloads/Rick and Morty - 02x01 - A Rickle in Time.mp4
Missing Metadata

Note: Target file is missing group metadata field in title and will be omitted gracefully

  • television_template: <$series - >< - S$season><E$episode - >< - $group - >< - $title><$extension>
  • target: ~/Downloads/The.Orville.S01E01.1080p.WEB-DL.DD5.1.H264-RARBG.mkv
  • result: ~/Downloads/The Orville - S01E01 - Old Wounds.mkv
Nesting Directories

Note: If the subdirectory doesn't exist, mnamer will create it

  • movie_template: <$title ><($year)><$extension>
  • movie_directory: /media/movies/<$title ><($year)>
  • target: ~/Downloads/The.Goonies.1985.720p.BluRay.x264-SiNNERS.mkv
  • result: /media/movies/The Goonies (1985)/The Goonies (1985).mkv

Metadata Fields

Field Description
title movie or episode title
year movie release year
series tv series' name
season tv series' airing season number
episode tv series' airing episode number

mnamer's People

Contributors

jkwill87 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.