Media file renamer and organizion tool

Overview

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=
   
    : limit the maximum number of hits for each query
  --ignore=
    
     : ignore files matching these regular expressions
  --language=
     
      : specify the search language
  --mask=
      
       : 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=
       
        : specifies configuration path to load --id-imdb=
        
         : specify an IMDb movie id override --id-tmdb=
         
          : specify a TMDb movie id override --id-tvdb=
          
           : specify a TVDb series id override --id-tvmaze=
           
            : 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.

Comments
  • Standalone version?

    Standalone version?

    Is there a way I can run mnamer standalone without installing from pip? I would like to wrapped in a .exe so I don’t have to depend on python environment. Is that possible? Thanks in advance.

    question / problem request wont do 
    opened by jaylex32 7
  • Crash on standard filenames

    Crash on standard filenames

    Hi

    Seeing a crash on the following filenames:

    • Get.Smart.-.1x27.-.Ship.Of.Spies.pt1.avi
    • Get.Smart.-.1x28.-.Ship.Of.Spies.pt2.avi

    thetvdb.com has parentheses in the names and I think this is the problem. Additionally, I am replacing '(' with an empty string in my mnamer config (below crash report). Without this replacement it is OK.

    Thanks for your work on this - I am using it to replace the use of filebot now it is closed source and being charged for.

    Crash report

    ============================== CRASH REPORT BEGIN ==============================
    
    --------------------------------- environment ----------------------------------
    
     - date = 2021-03-29
     - platform = Darwin-19.6.0-x86_64-i386-64bit
     - arguments = ['Get.Smart.-.1x28.-.Ship.Of.Spies.pt2.avi']
     - cache location = /Users/andrew/Library/Caches/mnamer-py3.7.sql
     - python version = 3.7.5
     - mnamer version = 2.5.2
     - appdirs version = 1.4.4
     - babelfish version = 0.5.5-dev
     - guessit version = 3.2.0
     - requests version = 2.24.0
     - requests cache version = 0.5.2
     - teletype version = 1.1.0
    
    --------------------------------- stack trace ----------------------------------
    
    Traceback (most recent call last):
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/__main__.py", line 23, in main
        frontend.launch()
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/frontends.py", line 80, in launch
        self._process_targets()
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/frontends.py", line 140, in _process_targets
        if target.destination == target.source:
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/target.py", line 106, in destination
        filename = filename_replace(filename, self._settings.replace_after)
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/utils.py", line 108, in filename_replace
        base = str_replace(base, replacements)
      File "/usr/local/share/python/py37/lib/python3.7/site-packages/mnamer/utils.py", line 328, in str_replace
        s = re.sub(word, replacement, s, flags=re.IGNORECASE)
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/re.py", line 192, in sub
        return _compile(pattern, flags).sub(repl, string, count)
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/re.py", line 286, in _compile
        p = sre_compile.compile(pattern, flags)
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/sre_compile.py", line 764, in compile
        p = sre_parse.parse(p, flags)
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/sre_parse.py", line 924, in parse
        p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/sre_parse.py", line 420, in _parse_sub
        not nested and not items))
      File "/Users/andrew/.conda/envs/py37/lib/python3.7/sre_parse.py", line 813, in _parse
        source.tell() - start)
    re.error: missing ), unterminated subpattern at position 0
    
    =============================== CRASH REPORT END ===============================
    

    ~/.mnamer-v2.json

    andrew@cass-imac:.../Get.Smart/Season.01$ cat ~/.mnamer-v2.json                 {
        "api_key_omdb": null,
        "api_key_tmdb": null,
        "api_key_tvdb": null,
        "api_key_tvmaze": null,
        "batch": true,
        "episode_api": "tvdb",
        "episode_directory": null,
        "episode_format": "S{season:02}E{episode:02}.{title}.{extension}",
        "hits": 5,
        "ignore": [
            ".*sample.*",
            "^RARBG.*"
        ],
        "lower": false,
        "mask": [
            ".avi",
            ".m4v",
            ".mp4",
            ".mkv",
            ".ts",
            ".wmv",
            ".srt",
            ".idx",
            ".sub"
        ],
        "movie_api": "tmdb",
        "movie_directory": null,
        "movie_format": "{name}.{extension}",
        "no_guess": true,
        "no_overwrite": true,
        "no_style": false,
        "recurse": false,
        "replace_after": {
            "&": "and",
            ";": ".",
            "@": "at",
            "[": "",
            "]": "",
            "(": "",
            ")": "",
            "'": "",
            "?": "",
            "!": "",
            ",": ".",
            ":": ".",
            "\"": ".",
            " ": "."
        },
        "replace_before": {},
        "scene": false,
        "verbose": false
    }
    
    bug 
    opened by andrewinHK 5
  • Edit embedded file metadata

    Edit embedded file metadata

    This request has nothing to do with the file renaming (which works/no issues), but it would be great if there was also an option to use TVDB/IMDB/etc. to get metadata and set it appropriately. I'm not sure how much use this would be to others (as many people use Plex, Emby, etc. which includes metadata formatted differently), but I think it would be useful to have it wholly contained in the file itself for reproducibility/non-reliance on other services.

    request 
    opened by pike00 5
  • Some Type of Convert Error

    Some Type of Convert Error

    hey i got an error. looks like I got sometype of country code error. can someone help me out?

    --------------------------------- stack trace ----------------------------------

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/babelfish/converters/init.py", line 157, in convert return self.to_symbol[alpha3] KeyError: 'mul'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/mnamer/main.py", line 22, in main frontend = Cli(settings) File "/home/pi/.local/lib/python3.7/site-packages/mnamer/frontends.py", line 67, in init super().init(settings) File "/home/pi/.local/lib/python3.7/site-packages/mnamer/frontends.py", line 25, in init self.targets = Target.populate_paths(self.settings) File "/home/pi/.local/lib/python3.7/site-packages/mnamer/target.py", line 61, in populate_paths targets = [cls(file_path, settings) for file_path in file_paths] File "/home/pi/.local/lib/python3.7/site-packages/mnamer/target.py", line 61, in targets = [cls(file_path, settings) for file_path in file_paths] File "/home/pi/.local/lib/python3.7/site-packages/mnamer/target.py", line 47, in init self._parse(file_path) File "/home/pi/.local/lib/python3.7/site-packages/mnamer/target.py", line 122, in _parse path_data[k] = Language.parse(v) File "/home/pi/.local/lib/python3.7/site-packages/mnamer/language.py", line 48, in parse return cls(value.name, value.alpha2, value.alpha3) File "/home/pi/.local/lib/python3.7/site-packages/babelfish/language.py", line 150, in getattr return language_converters[name].convert(alpha3, country, script) File "/home/pi/.local/lib/python3.7/site-packages/babelfish/converters/init.py", line 159, in convert raise LanguageConvertError(alpha3, country, script) babelfish.exceptions.LanguageConvertError: mul

    =============================== CRASH REPORT END ===============================

    question / problem 
    opened by jojobrogess 4
  • Plus character in filename causes TypeError

    Plus character in filename causes TypeError

    $ mnamer --version
    mnamer v1.4.2
    
    $ mnamer Dogman.2018.Bluray.Full.HD.1080p.x264.DTS+AC3.5.1.ITA.SUB-CB01HD.mkv
    
    Starting mnamer
    
    Detected File
    Dogman.2018.Bluray.Full.HD.1080p.x264.DTS+AC3.5.1.ITA.SUB-CB01HD
    Traceback (most recent call last):
      File "/usr/local/bin/mnamer", line 8, in <module>
        sys.exit(main())
      File "/home/admin/.local/lib/python3.5/site-packages/mnamer/__main__.py", line 385, in main
        process_files(targets, user_media, test_run, id_key, **config)
      File "/home/admin/.local/lib/python3.5/site-packages/mnamer/__main__.py", line 213, in process_files
        meta = meta_parse(file_path, user_media)
      File "/home/admin/.local/lib/python3.5/site-packages/mnamer/utils.py", line 200, in meta_parse
        meta["quality"] += " " + data[field]
    TypeError: Can't convert 'list' object to str implicitly
    
    $ mv Dogman.2018.Bluray.Full.HD.1080p.x264.DTS+AC3.5.1.ITA.SUB-CB01HD.mkv Dogman.2018.Bluray.Full.HD.1080p.x264.DTSAC3.5.1.ITA.SUB-CB01HD.mkv
    
    $ mnamer Dogman.2018.Bluray.Full.HD.1080p.x264.DTSAC3.5.1.ITA.SUB-CB01HD.mkv
    
    Starting mnamer
    
    Detected File
    Dogman.2018.Bluray.Full.HD.1080p.x264.DTSAC3.5.1.ITA.SUB-CB01HD
    
    Query Results
      [1] Dogman (2018)
      [2] Dogman (2012)
      [3] Dogman 2: the Wrath of The Litter (2014)
      [RETURN] for default, [s]kip, [q]uit
       > Your Choice? 1
    
    
    bug wont do 
    opened by colemar 4
  • Config file not loaded

    Config file not loaded

    Right, installed mnamer on my NAS running Archlinux ARM using pip3 command.

    Dump the config file and made the necessary changes and saved it as ~/.mnamer-V2.json (see config file below)

    When I run the command line, all show are detected, renamed (not as setup on the config file) and also not moved as the config file.

    python -m mnamer -bv /mnt/hd/Download/

    p.s. I had to install it using sudo pip3 install mnamer as it was complaining of some right issue.

    { "api_key_omdb": null, "api_key_tmdb": null, "api_key_tvdb": null, "api_key_tvmaze": null, "batch": false, "episode_api": "tvmaze", "episode_directory": "/mnt/hd/Show/{series}", "episode_format": "{series} - {season:02}x{episode:02} - {title}{extension}", "hits": 5, "ignore": [ ".*sample.*", "^RARBG.*" ], "lower": false, "mask": [ ".avi", ".m4v", ".mp4", ".mkv", ".ts", ".wmv" ], "movie_api": "tmdb", "movie_directory": "/mnt/hd/Movie/{name} ({year})", "movie_format": "{name} ({year}){extension}", "no_cache": false, "no_guess": false, "no_replace": false, "no_style": false, "recurse": false, "replacements": { "&": "and", ":": "", ";": ",", "@": "at" }, "scene": false, "verbose": false }

    question / problem 
    opened by SweetthD3ViL 4
  • more renaming options, like format and source

    more renaming options, like format and source

    Need templates to include the option of <$format> and <$source> to rename files reading from the filename (or even better, reading the file and detecting the format... although this is probably impossible to do with source) so something like:

    /Downloads/Rick.and.Morty.S02E01.Bluray.1080p.x264-RARBG.mp4

    is turned into /Downloads/Rick and Morty - S02E01 (1080p) (Blu-ray).mp4

    request 
    opened by rodibin-at-placemaildotonline 4
  • MAPI SQLite DB gets corrupted when accessed by multiple processes at once

    MAPI SQLite DB gets corrupted when accessed by multiple processes at once

    Basically I had 20 or so mnamer instances processing a bunch of different files and that seems to have corrupted the mapi sqlite db. I could no longer use the app until until I completely removed the db.

    opened by Rambomst 4
  • embed application key for tmdb

    embed application key for tmdb

    TMDB does also provide application level keys, which are aimed to be used by application developers to embed in their apps. This means that mnamer could include such a key to allow use without requiring each user to register a way.

    I wrote this because I obtained such a key by simple filing a form, the next day I got the key for mnamer. Isn't that cool?

    I would not remove the ability to define a user key, as an app key might be revoked, but from from the UX point of view, that is a great improvement. Details on https://developers.themoviedb.org/3/getting-started/introduction

    request 
    opened by ssbarnea 3
  • Crash due to permissions issue

    Crash due to permissions issue

    I encountered a crash and am filing it here as directed in the crash text:

    Starting mnamer
    
    Processing Episode "Euphoria (US) - S02E03 - Ruminations - Big and Little Bullies.mp4" (343.07MB)
    moving to /mnt/sort/Euphoria - S02E03 - Ruminations Big and Little Bullys.mp4
    
    ============================== CRASH REPORT BEGIN ==============================
    
    --------------------------------- environment ----------------------------------
    
     - date = 2022-01-25
     - platform = Linux-3.10.105-x86_64-with
     - arguments = ['-b', '-r', '/mnt/new', '--episode-directory=/mnt/sort', '--movie-directory=/mnt/sort']
     - cache location = /home/mnamer/.cache/mnamer-py3.9.sql
     - python version = 3.9.2
     - mnamer version = 2.4.2
     - appdirs version = 1.4.4
     - babelfish version = 0.5.5-dev
     - guessit version = 3.1.1
     - requests version = 2.25.1
     - requests cache version = 0.5.2
     - teletype version = 1.1.0
    
    --------------------------------- stack trace ----------------------------------
    
    Traceback (most recent call last):
      File "/home/mnamer/.local/lib/python3.9/site-packages/mnamer/__main__.py", line 23, in main
        frontend.launch()
      File "/home/mnamer/.local/lib/python3.9/site-packages/mnamer/frontends.py", line 80, in launch
        self._process_targets()
      File "/home/mnamer/.local/lib/python3.9/site-packages/mnamer/frontends.py", line 153, in _process_targets
        self._rename_and_move_file(target)
      File "/home/mnamer/.local/lib/python3.9/site-packages/mnamer/frontends.py", line 189, in _rename_and_move_file
        target.relocate()
      File "/home/mnamer/.local/lib/python3.9/site-packages/mnamer/target.py", line 242, in relocate
        destination_path.parent.mkdir(parents=True, exist_ok=True)
      File "/usr/local/lib/python3.9/pathlib.py", line 1312, in mkdir
        self._accessor.mkdir(self, mode)
    PermissionError: [Errno 13] Permission denied: '/mnt/sort'
    
    =============================== CRASH REPORT END ===============================
    
    Dang, it looks like mnamer crashed! Please consider filling an issue at
    
    question / problem 
    opened by gingerbeardman 3
  • "Docker container stopped unexpectedly" on Synology NAS

    I installed this from jkwill87/mnamer:latest container in the docker registry on my Synology NAS.

    Shortly after the container is launched, it stops unexpectedly.

    I get a notification saying as much, but there are no related errors in the log.

    I am using:

    • user: admin
    • PUID = 1024
    • PGID = 100
    • NAS /video/Movies = container /mnt/movies
    • NAS /video/TV Shows = container /mnt/episodes

    Any ideas how I can provide you with more useful information?

    Thanks for this great tool! I'm eager to stop using it interactively.

    opened by gingerbeardman 3
  • Update twine requirement from ~=4.0.0 to ~=4.0.2

    Update twine requirement from ~=4.0.0 to ~=4.0.2

    Updates the requirements on twine to permit the latest version.

    Release notes

    Sourced from twine's releases.

    4.0.2

    https://pypi.org/project/twine/4.0.2/

    Changelog

    Changelog

    Sourced from twine's changelog.

    Twine 4.0.2 (2022-11-30)

    Bugfixes ^^^^^^^^

    • Remove deprecated function to fix twine check with pkginfo 1.9.0. ([#941](https://github.com/pypa/twine/issues/941) <https://github.com/pypa/twine/issues/941>_)

    Twine 4.0.1 (2022-06-01)

    Bugfixes ^^^^^^^^

    • Improve logging when keyring fails. ([#890](https://github.com/pypa/twine/issues/890) <https://github.com/pypa/twine/issues/890>_)
    • Reconfgure root logger to show all log messages. ([#896](https://github.com/pypa/twine/issues/896) <https://github.com/pypa/twine/issues/896>_)

    Twine 4.0.0 (2022-03-31)

    Features ^^^^^^^^

    • Drop support for Python 3.6. ([#869](https://github.com/pypa/twine/issues/869) <https://github.com/pypa/twine/issues/869>_)
    • Use Rich to add color to upload output. ([#851](https://github.com/pypa/twine/issues/851) <https://github.com/pypa/twine/issues/851>_)
    • Use Rich to add color to check output. ([#874](https://github.com/pypa/twine/issues/874) <https://github.com/pypa/twine/issues/874>_)
    • Use Rich instead of tqdm for upload progress bar. ([#877](https://github.com/pypa/twine/issues/877) <https://github.com/pypa/twine/issues/877>_)

    Bugfixes ^^^^^^^^

    • Remove Twine's dependencies from the User-Agent header when uploading. ([#871](https://github.com/pypa/twine/issues/871) <https://github.com/pypa/twine/issues/871>_)
    • Improve detection of disabled BLAKE2 hashing due to FIPS mode. ([#879](https://github.com/pypa/twine/issues/879) <https://github.com/pypa/twine/issues/879>_)
    • Restore warning for missing long_description. ([#887](https://github.com/pypa/twine/issues/887) <https://github.com/pypa/twine/issues/887>_)

    Twine 3.8.0 (2022-02-02)

    Features ^^^^^^^^

    • Add --verbose logging for querying keyring credentials. ([#849](https://github.com/pypa/twine/issues/849) <https://github.com/pypa/twine/issues/849>_)
    • Log all upload responses with --verbose. ([#859](https://github.com/pypa/twine/issues/859) <https://github.com/pypa/twine/issues/859>_)
    • Show more helpful error message for invalid metadata. ([#861](https://github.com/pypa/twine/issues/861) <https://github.com/pypa/twine/issues/861>_)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update mypy requirement from ~=0.982 to ~=0.991

    Update mypy requirement from ~=0.982 to ~=0.991

    Updates the requirements on mypy to permit the latest version.

    Commits
    • b7788fc Update version to remove "+dev" for releasing 0.991
    • 6077d19 manually CP typeshed #9130
    • ab0ea1e Fix crash with function redefinition (#14064)
    • 592a9ce Fix another crash with report generation on namespace packages (#14063)
    • 1650ae0 Update --no-warn-no-return docs for empty body changes (#14065)
    • b9daa31 Don't ignore errors in files passed on the command line (#14060)
    • 02fd8a5 Filter out wasm32 wheel in upload-pypi.py (#14035)
    • 131c8d7 Fix crash on inference with recursive alias to recursive instance (#14038)
    • 1368338 Change version to 0.991+dev in preparation for the point release
    • b71dc3d Remove +dev from version
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update wheel requirement from ~=0.38.0 to ~=0.38.4

    Update wheel requirement from ~=0.38.0 to ~=0.38.4

    Updates the requirements on wheel to permit the latest version.

    Changelog

    Sourced from wheel's changelog.

    Release Notes

    UNRELEASED

    • Updated vendored packaging to 22.0

    0.38.4 (2022-11-09)

    • Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri)

    0.38.3 (2022-11-08)

    • Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg

    0.38.2 (2022-11-05)

    • Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags

    0.38.1 (2022-11-04)

    • Removed install dependency on setuptools
    • The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.

    0.38.0 (2022-10-21)

    • Dropped support for Python < 3.7
    • Updated vendored packaging to 21.3
    • Replaced all uses of distutils with setuptools
    • The handling of license_files (including glob patterns and default values) is now delegated to setuptools>=57.0.0 (#466). The package dependencies were updated to reflect this change.
    • Fixed potential DoS attack via the WHEEL_INFO_RE regular expression
    • Fixed ValueError: ZIP does not support timestamps before 1980 when using SOURCE_DATE_EPOCH=0 or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.

    0.37.1 (2021-12-22)

    • Fixed wheel pack duplicating the WHEEL contents when the build number has changed (#415)
    • Fixed parsing of file names containing commas in RECORD (PR by Hood Chatham)

    0.37.0 (2021-08-09)

    • Added official Python 3.10 support
    • Updated vendored packaging library to v20.9

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update appdirs requirement from ~=1.4.0 to ~=1.4.4

    Update appdirs requirement from ~=1.4.0 to ~=1.4.4

    Updates the requirements on appdirs to permit the latest version.

    Release notes

    Sourced from appdirs's releases.

    1.4.4

    [PR #92] Don't import appdirs from setup.py Project officially classified as Stable which is important for inclusion in other distros such as ActivePython.

    First of several incremental releases to catch up on maintenance.

    Changelog

    Sourced from appdirs's changelog.

    appdirs 1.4.4

    • [PR #92] Don't import appdirs from setup.py which resolves issue #91
    • [PR #100] Corrects the config directory on OSX/macOS, which resolves issue #63.

    Project officially classified as Stable which is important for inclusion in other distros such as ActivePython.

    appdirs 1.4.3

    • [PR #76] Python 3.6 invalid escape sequence deprecation fixes
    • Fix for Python 3.6 support

    appdirs 1.4.2

    • [PR #84] Allow installing without setuptools
    • [PR #86] Fix string delimiters in setup.py description
    • Add Python 3.6 support

    appdirs 1.4.1

    • [issue #38] Fix _winreg import on Windows Py3
    • [issue #55] Make appname optional

    appdirs 1.4.0

    • [PR #42] AppAuthor is now optional on Windows
    • [issue 41] Support Jython on Windows, Mac, and Unix-like platforms. Windows support requires JNA <https://github.com/twall/jna>_.
    • [PR #44] Fix incorrect behaviour of the site_config_dir method

    appdirs 1.3.0

    • [Unix, issue 16] Conform to XDG standard, instead of breaking it for everybody
    • [Unix] Removes gratuitous case mangling of the case, since *nix-es are usually case sensitive, so mangling is not wise
    • [Unix] Fixes the utterly wrong behaviour in site_data_dir, return result based on XDG_DATA_DIRS and make room for respecting the standard which specifies XDG_DATA_DIRS is a multiple-value variable
    • [Issue 6] Add *_config_dir which are distinct on nix-es, according to XDG specs; on Windows and Mac return the corresponding *_data_dir

    appdirs 1.2.0

    • [Unix] Put user_log_dir under the cache dir on Unix. Seems to be more typical.
    • [issue 9] Make unicode work on py3k.

    ... (truncated)

    Commits
    • 7af32e0 Update travis to remove unsupported python versions. Add 3.7 and 3.8.
    • 8ea7ee1 Update info on 1.4.4 release.
    • 0bd365a Update python versions, remove 2.6 and old 3.x, added 3.7 and 3.8.
    • 0a826b0 Updated maintainer information. Also fixes issue w/ PYPI metadata being stric...
    • 5cf18cb Tighten up new changes text to render correctly on PyPI.
    • 69b55d0 Bump version, now listed as stable and import fix.
    • 885dd14 bump
    • 8048f67 Has been in use for years in core python libraries. Changing classifier to st...
    • 494089c Merge pull request #92 from leorochael/leorochael-no-import-of-appdirs-during...
    • b0262da Don't import appdirs from setup.py
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Crash when processing an episode file using tvdb provider

    Crash when processing an episode file using tvdb provider

    This is one of 12 episodes in the series, the other 11 processed fine using mnamer. Attaching a crash report below:

    Processing Episode "S01E10-Kanchikan Repara-te.mkv" (245.21MB)
    
    ============================== CRASH REPORT BEGIN ==============================
    
    --------------------------------- environment ----------------------------------
    
     - date = 2023-01-03
     - platform = Linux-5.15.76-v8+-aarch64-with-glibc2.31
     - arguments = ['./']
     - cache location = /home/user/.cache/mnamer-py3.9.sql
     - python version = 3.9.2
     - mnamer version = 2.5.4
     - appdirs version = 1.4.4
     - guessit version = 3.2.0
     - requests version = 2.25.1
     - requests cache version = 0.5.2
     - teletype version = 1.1.0
    
    --------------------------------- stack trace ----------------------------------
    
    Traceback (most recent call last):
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/__main__.py", line 23, in main
        frontend.launch()
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/frontends.py", line 80, in launch
        self._process_targets()
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/frontends.py", line 97, in _process_targets
        matches = target.query()
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/target.py", line 233, in query
        for idx, result in enumerate(results, start=1):
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/providers.py", line 245, in search
        for result in results:
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/providers.py", line 302, in _search_series
        series_data = tvdb_search_series(
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/endpoints.py", line 402, in tvdb_search_series
        Language.ensure_valid_for_tvdb(language)
      File "/home/user/.local/lib/python3.9/site-packages/mnamer/language.py", line 93, in ensure_valid_for_tvdb
        raise MnamerException("'lang' must be one of %s" % ",".join(valid))
    mnamer.exceptions.MnamerException: 'lang' must be one of ru,pl,pt,ja,tr,fi,hu,el,fr,nl,sv,ko,hr,cs,es,da,en,zh,it,sl,de,no,he
    
    =============================== CRASH REPORT END ===============================
    
    Dang, it looks like mnamer crashed! Please consider filling an issue at
    https://github.com/jkwill87/mnamer/issues along with this report.
    
    opened by Sanrax 0
  • Container running under Podman errors with sqlite3.OperationalError: unable to open database file

    Container running under Podman errors with sqlite3.OperationalError: unable to open database file

    Similar error to Issue #133 however the suggested --no-cache workaround does not work.

    Podman is a drop-in replacement for Docker however it does not permit containers to run as root. Wondering if this issue is related to that?

    Here is how I launch the container session: podman run -it --rm --name b3vis-mnamer -v /home/wade/Movies:/mnt --entrypoint "/bin/sh" b3vis/mnamer:latest

    Here is the mnamer command I used: python -m mnamer -v --no-cache -r /mnt

    system

    • date = 2023-01-02
    • platform = Linux-5.15.0-56-generic-x86_64-with
    • arguments = ['-v', '--no-cache', '-r', '/mnt']
    • cache location = /root/.cache/mnamer-py3.9.sql
    • python version = 3.9.9
    • mnamer version = 2.5.2
    • appdirs version = 1.4.4
    • babelfish version = 0.5.5-dev
    • guessit version = 3.2.0
    • requests version = 2.26.0
    • requests cache version = 0.5.2
    • teletype version = 1.1.0

    settings

    • targets = [PosixPath('/mnt')]
    • batch = False
    • lower = False
    • recurse = True
    • scene = False
    • verbose = True
    • hits = 5
    • ignore = ['.sample.', '^RARBG.*']
    • language = None
    • mask = ['.avi', '.m4v', '.mp4', '.mkv', '.ts', '.wmv', '.srt', '.idx', '.sub']
    • no_guess = False
    • no_overwrite = False
    • no_style = False
    • movie_api = tmdb
    • movie_directory = None
    • movie_format = {name} ({year}).{extension}
    • episode_api = tvmaze
    • episode_directory = None
    • episode_format = {series} - S{season:02}E{episode:02} - {title}.{extension}
    • version = False
    • clear_cache = False
    • config_dump = False
    • config_ignore = False
    • config_path = None
    • id_imdb = None
    • id_tmdb = None
    • id_tvdb = None
    • id_tvmaze = None
    • no_cache = True
    • media = None
    • test = False
    • api_key_omdb = None
    • api_key_tmdb = None
    • api_key_tvdb = None
    • api_key_tvmaze = None
    • replace_before = {}
    • replace_after = {'&': 'and', '@': 'at', ';': ','}

    targets

    • /mnt/SNL_SEASON_1_VOL_2/Saturday Night Live S1 E4.mkv
    • /mnt/SNL_SEASON_1_VOL_2/Saturday Night Live S1 V2 E2.mkv
    • /mnt/SNL_SEASON_1_VOL_2/Saturday Night Live S1 V2 E3.mkv Starting mnamer

    Processing Episode "Saturday Night Live S1 E4.mkv" (2.26GB) /mnt/SNL_SEASON_1_VOL_2/Saturday Night Live S1 E4.mkv using tvmaze

    search parameters

    • container = .mkv
    • group = None
    • language = None
    • language_sub = None
    • quality = None
    • synopsis = None
    • media = episode
    • series = Saturday Night Live
    • season = 1
    • episode = 4
    • date = None
    • title = None
    • id_tvdb = None
    • id_tvmaze = None
    • extension = .mkv

    ============================== CRASH REPORT BEGIN ==============================

    --------------------------------- environment ----------------------------------

    • date = 2023-01-02
    • platform = Linux-5.15.0-56-generic-x86_64-with
    • arguments = ['-v', '--no-cache', '-r', '/mnt']
    • cache location = /root/.cache/mnamer-py3.9.sql
    • python version = 3.9.9
    • mnamer version = 2.5.2
    • appdirs version = 1.4.4
    • babelfish version = 0.5.5-dev
    • guessit version = 3.2.0
    • requests version = 2.26.0
    • requests cache version = 0.5.2
    • teletype version = 1.1.0

    --------------------------------- stack trace ----------------------------------

    Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/mnamer/main.py", line 23, in main frontend.launch() File "/usr/local/lib/python3.9/site-packages/mnamer/frontends.py", line 80, in launch self._process_targets() File "/usr/local/lib/python3.9/site-packages/mnamer/frontends.py", line 97, in _process_targets matches = target.query() File "/usr/local/lib/python3.9/site-packages/mnamer/target.py", line 233, in query for idx, result in enumerate(results, start=1): File "/usr/local/lib/python3.9/site-packages/mnamer/providers.py", line 374, in search yield from self._search_with_season_and_episode( File "/usr/local/lib/python3.9/site-packages/mnamer/providers.py", line 437, in _search_with_season_and_episode series_data = tvmaze_show_search(series) File "/usr/local/lib/python3.9/site-packages/mnamer/endpoints.py", line 466, in tvmaze_show_search status, content = request_json(url, parameters, cache=cache) File "/usr/local/lib/python3.9/site-packages/mnamer/utils.py", line 264, in request_json session = get_session() File "/usr/local/lib/python3.9/site-packages/mnamer/utils.py", line 188, in get_session get_session.session = requests_cache.CachedSession( File "/usr/local/lib/python3.9/site-packages/requests_cache/core.py", line 73, in init self.cache = backends.create_backend(backend, cache_name, backend_options) File "/usr/local/lib/python3.9/site-packages/requests_cache/backends/init.py", line 63, in create_backend return registry[backend_name](cache_name, **options) File "/usr/local/lib/python3.9/site-packages/requests_cache/backends/sqlite.py", line 28, in init self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) File "/usr/local/lib/python3.9/site-packages/requests_cache/backends/storage/dbdict.py", line 62, in init with self.connection() as con: File "/usr/local/lib/python3.9/contextlib.py", line 119, in enter return next(self.gen) File "/usr/local/lib/python3.9/site-packages/requests_cache/backends/storage/dbdict.py", line 74, in connection con = sqlite.connect(self.filename) sqlite3.OperationalError: unable to open database file

    =============================== CRASH REPORT END ===============================

    Dang, it looks like mnamer crashed! Please consider filling an issue at https://github.com/jkwill87/mnamer/issues along with this report.

    opened by wadebee 1
Releases(2.5.4)
  • 2.5.4(Dec 22, 2022)

  • 2.5.3(Dec 22, 2022)

    :bug: Bug Fixes

    • (#135) Properly applies --no-style - thanks @andrewinHK!
    • (#132) Properly escapes regex - thanks @andrewinHK and @AnalogMan151!

    :pencil2: Other

    • Fixes failing TVMaze tests
    • Updates usage messaging
    Source code(tar.gz)
    Source code(zip)
  • 2.5.2(Jan 8, 2021)

    :star2: Features

    • (#109) Improves OMDb rate limiting errors - thanks @zendamacf!
    • (#106) Fixes specials (season 0) handling

    :bug: Bug Fixes

    • (#105) Fixes Docker UID/GUI configuration - thanks @waenhill!
    • Handles undetectable languages more gracefully

    :pencil2: Other

    • Automates Testing, Coverage checks, and PyPI publishing using GitHub Actions
    • Reenables previously flaky TVDb tests
    • Adds additional function type annotations
    • Allows mnamer to be installed from sdist on Windows
    Source code(tar.gz)
    Source code(zip)
  • 2.4.2(Sep 25, 2020)

    :star2: Features

    • #99 Adds support to .sub and .idx subtitle files
    • #102 Allows users to specify UID and GID in Dockerfile

    :bug: Bug Fixes

    • #104 Fixes movie year search tolerance to TMDb and OMDb

    :pencil2: Other

    • Sets the default episode provider back to TVMaze
      • They plan to deprecate v3 of their API in 2011 and require a $11 annual subscription in v4 for API end users (e.g. you)
      • Their service is consistently down
    • Disabled TVDb tests in CI for the time being
    Source code(tar.gz)
    Source code(zip)
  • 2.4.1(Jul 7, 2020)

    The focus on this release is around internationalization. See the wiki for details.

    :star2: Features

    • #9 Adds Language Support
    • #82 Adds Subtitle Support

    :pencil2: Other

    • Changes default episode provider to TVDb (for its language support)
    • Increases matched year range to +-5 years to yield more matches
    Source code(tar.gz)
    Source code(zip)
  • 2.3.3(Apr 21, 2020)

  • 2.3.2(Apr 18, 2020)

    :bug: Bug Fixes

    • #68 Fixes specifying destination drive under Windows
    • #67 Fixes title capitalization within parentheses and after apostrophes

    :pencil2: Other

    • Allows CLI arguments to override config file settings
    • Fixes unit testing under Windows
    • Splits requirements file into separate dev and test files
    Source code(tar.gz)
    Source code(zip)
  • 2.3.1(Mar 29, 2020)

    :bug: Bug Fixes

    • #58 Prevents unintended directory nesting when templating media with slashes in the name or title
    • #63 Allows relative path use with movie-directory and episode-directory settings

    :pencil2: Other

    • Reenables TVDb unit tests
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Feb 13, 2020)

  • 2.1.0(Feb 13, 2020)

  • 2.0.2(Feb 7, 2020)

  • 2.0.1(Feb 5, 2020)

    🐛 Bug Files

    • #39, #40 Adds support for parsing video files with multiple quality tags
    • #42 Detects files with uppercase extensions
    • #45 Fixes multi-part episode handling

    ✏️ Other Notes

    • Sets the default number of hits displayed to 5
    • Refactors tty class to into a module
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Jan 27, 2020)

    :star2: Features

    • A new curses-like interactive navigation using teletype
    • Added TvMaze provider as the new default for television episodes
    • Added noguess, nocache directives
    • Adds documentation using GitBook

    :pencil2: Other Notes

    • Drops support for Python 2
    • Rolls mapi dependency into mnamer
    Source code(tar.gz)
    Source code(zip)
  • 1.4.1(Aug 22, 2018)

    :star2: Features

    • #13 Python 2.7 Support
    • #18 Extension mask works with or without dot prefixes

    :bug: Bug Fixes

    • #14/#16 Fix bugs causing TVDb search results to not show up
    • #15 Fix non-alphanumeric characters in filenames

    :pencil2: Other

    • #19 guessit updated to version 3
    • Using semantic versioning going forward
    Source code(tar.gz)
    Source code(zip)
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

phithon 53 Nov 7, 2022
Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

G-jon FujiYama 2 Jan 10, 2022
A python script to convert an ucompressed Gnucash XML file to a text file for Ledger and hledger.

README 1 gnucash2ledger gnucash2ledger is a Python script based on the Github Gist by nonducor (nonducor/gcash2ledger.py). This Python script will tak

Thomas Freeman 0 Jan 28, 2022
Python package to read and display segregated file names present in a directory based on type of the file

tpyfilestructure Python package to read and display segregated file names present in a directory based on type of the file. Installation You can insta

Tharun Kumar T 2 Nov 28, 2021
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

null 1 Feb 13, 2022
gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Presslabs 2.3k Jan 8, 2023
This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that have that extension.

FileBulk This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that h

Enoc Mena 1 Jun 26, 2022
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Xerox 1 Jan 3, 2022
Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Jaap Roes 14 Dec 30, 2022
Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

Alex Eckardt 1 Jan 9, 2022
Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

laojunjun 13 Nov 23, 2022
File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Samuel Ko 1 Feb 5, 2022
Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

null 2 Oct 15, 2022
This is a junk file creator tool which creates junk files in Internal Storage

This is a junk file creator tool which creates junk files in Internal Storage

KiLL3R_xRO 3 Jun 20, 2021
organize - The file management automation tool

organize - The file management automation tool

Thomas Feldmann 1.5k Jan 1, 2023
A simple file sharing tool written in python

Share it A simple file sharing tool written in python Installation If you are using Windows os you can directly Run .exe file --> download If you are

Sachit Yadav 7 Dec 16, 2022
An universal file format tool kit. At present will handle the ico format problem.

An universal file format tool kit. At present will handle the ico format problem.

Sadam·Sadik 1 Dec 26, 2021
MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

null 31 Nov 17, 2022
This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it

This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it. In the current state, it outputs a PrettyTable to txt file as well as the raw data from that table into a csv.

Joshua Wren 1 Nov 9, 2021