Skip to main content

Rename anime files using ED2K hash and AniDB.

Project description

anipyrenamer

anipyrenamer is a command-line tool that renames anime files using ED2K hash lookups from AniDB, with local SQLite caching for faster reruns and offline support.

It fits alongside local media libraries (Plex/Jellyfin folders, plain disk collections): you point it at files or folders, it resolves titles and episode metadata from AniDB, then renames in place or into a destination tree.

Requirements

  • Python 3.13+
  • An AniDB account and UDP API client registration (for online lookup). You can use --offline when the SQLite cache already has the rows you need.

Install

# From the repository root (the directory that contains pyproject.toml).

python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

pip install -e ".[dev]"
cp .env.example .env
# edit .env — never commit secrets

For a minimal install without dev dependencies: pip install -e .

Optional helper scripts are in scripts/ (install.sh / install.bat, install-dev.*, setup-venv.*).

Configuration

Put credentials and client strings in .env (see .env.example). Required for online mode:

  • ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_UDP_CLIENT, ANIDB_UDP_CLIENTVER, ANIDB_LOCAL_PORT

Optional:

  • ANIDB_API_KEY (when UDP encryption is enabled)

Where .env is loaded: project/package directory and parents first, then a well-known config path: Windows %APPDATA%\anipyrenamer\.env, Linux/macOS ~/.config/anipyrenamer/.env.

Cache: When a parent directory contains pyproject.toml, the default database is project root .cache/anipyrenamer_cache.sqlite. Otherwise it lives under the same config directory as .env. Override with --db.

Usage

anipyrenamer <path> [paths...]

Examples:

anipyrenamer "C:\Videos\Anime" --dry-run
anipyrenamer "C:\Videos\Anime"
anipyrenamer "C:\Videos\Anime" --yes
anipyrenamer "C:\Videos\Anime" -t "%title% S01E%epno%%ext%" -d "C:\Renamed"
anipyrenamer "C:\Videos\Anime" --mylist

Use anipyrenamer --help for all options.

Confirmation prompts

Interactive confirmations use Prompt text (Y/n/a):Y (default), n, or a (yes to all remaining).

Platforms

Developed and tested on Windows and Unix-like systems (Linux, macOS). Paths in examples use Windows style where helpful; adjust for your OS.

Troubleshooting

See docs/runbook.md for exit codes, common failures, and safe reruns.

Contributing and issues

Report bugs and request features via the project issue tracker on GitHub.

Development

Parts of this codebase were written or refactored with AI-assisted coding tools, alongside manual design, testing, and review. Human maintainers remain responsible for behavior and releases.

License

Distributed under the MIT License. Dependency licenses vary; review them when preparing redistributions (wheel, bundle, installer).

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

anipyrenamer-1.1.0.tar.gz (49.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anipyrenamer-1.1.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file anipyrenamer-1.1.0.tar.gz.

File metadata

  • Download URL: anipyrenamer-1.1.0.tar.gz
  • Upload date:
  • Size: 49.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for anipyrenamer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5a064d0a93bf7152ff76e0967c24b6a2ecf4b8ec67bad565c031a7ef297158a7
MD5 8ff3474817fd61bc74b7cea9a91d1cd4
BLAKE2b-256 e84bcbf8e9fd421918f8964c531ea2374c2c164f5199ac447ddb5cdb2fc4bc1b

See more details on using hashes here.

File details

Details for the file anipyrenamer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: anipyrenamer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for anipyrenamer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cf32da5c30b68c0c1ed27cee16813c92108b5c36727781c945df7f82f56b6df
MD5 7fcbec239cc3ab184112b2e889368fb2
BLAKE2b-256 b475526c428a6adfa2259194b4803392f6c3e1f5fea730e3f54f6623454d3287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page