Skip to main content

reelname

PyPI version Python versions CI

License: MIT Code Style: Black Lint: Ruff Typing: mypy

A tool to fix media file names

Demo

📐 Requirements

  • Python >= 3.9

📦 Installation

pip install reelname

🧪 Usage

export TMDB_API_KEY=your-key-or-token
  • Preview the renames first, then run them:
reelname --dry-run /path/to/media
reelname /path/to/media
  • Sort a downloads folder (and its subfolders) into a library without breaking seeding torrents: the library gets hardlinks with the new names, and the downloads stay as they are:
reelname -r --hardlink -o /path/to/library /path/to/downloads
  • Name episodes the way Plex and Jellyfin like them, with their titles (Breaking Bad (2008) - S01E01 - Pilot.mkv):
reelname --episode-titles /path/to/shows
  • Changed your mind? Undo the last run in that folder:
reelname --undo /path/to/media
  • To view the help message, run the following command:
reelname --help

🛠️ Features

  • Renames movies to Title (Year) … and TV episodes to Show (Year) S01E07 …, keeping the release info that follows.
  • Finds the title even without a year (Dune.Part.Two.1080p.mkv), and tells real years from numbers in titles (Blade.Runner.2049.2017).
  • Uses more than the file name when it has to: an IMDb ID in the name or in an .nfo file (a movie's, a show's or an episode's), the release folder (Inception.2010.1080p-GRP/abc123.mkv), or the show folder (Breaking Bad/Season 1/S01E01.mkv, even Breaking Bad/Season 2/05.mkv).
  • Matches original and alternative titles (Gisaengchung → Parasite), ignores accents (Amelie → Amélie), and finds long titles from their start (Birdman → Birdman or (The Unexpected Virtue of Ignorance)).
  • Renames subtitles and .nfo files together with their video.
  • Turns colons into dashes (Mission - Impossible) and slashes into spaces (Face Off) instead of dropping them.
  • Only renames video and subtitle files, and skips samples and trailers.
  • Leaves a file alone when TMDb doesn't confirm it, or when the name could be more than one title (like a remake).
  • Never overwrites an existing file.
  • Renames a Blu-ray or DVD folder as a whole (Heat (1995) BluRay), and never anything inside it.
  • Says when a name is taken by an identical file (duplicate of …).
  • Caches TMDb answers, revalidates them cheaply when they expire, falls back to them when TMDb is unreachable, retries when TMDb is busy, and in watch mode waits for files and folders to finish copying.
  • Logs every rename, so --undo can put names back.

Searches are cached in ~/.cache/reelname and the rename history is kept in ~/.local/share/reelname (or under $XDG_CACHE_HOME and $XDG_DATA_HOME). Set REELNAME_CACHE_DIR or REELNAME_DATA_DIR to use other folders.

🧾 Changelog

See CHANGELOG.md

🙏 Credits

  • Click, for enabling delightful CLI development.
  • TMDb, for movie data. This product uses the TMDB API but is not endorsed or certified by TMDB.
  • Inspired by Simon Willison's work.

📄 License

MIT © Visesh Prasad

Metadata

Release files for reelname 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reelname 3.1.0
File Size Uploaded Provenance Actions
reelname-3.1.0.tar.gz 350.2 kB Without provenance Details for reelname-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reelname 3.1.0
File Interpreter ABI Platform Actions
reelname-3.1.0-py3-none-any.whl Python 3 none any Details for reelname-3.1.0-py3-none-any.whl

Total release size: 381.1 kB

Release files / reelname-3.1.0.tar.gz

Download URL reelname-3.1.0.tar.gz
Size 350.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9b312b262c0b664f8ee8bf22399c74c56223d5d246b24fbeddd98732b4419fd9
BLAKE2b-256 checksum
How to use checksums
ddcbbc546fa6262a61460b31ed92d1a1f1cc9c92fa27fe227d7f36b0187b63cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / reelname-3.1.0-py3-none-any.whl

Download URL reelname-3.1.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
871c46264cc8801762d417230349948a4f494f3faaaa06cbe88262ca3789ddab
BLAKE2b-256 checksum
How to use checksums
67bd6be9aad40b9d85417ebd73a7ae8c5ce80c80f79352ff7ef5cc2f58faabd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for reelname 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page