Renames music files based on their tags
Project description
Jamz
Jamz is a small command-line utility for renaming music files based on their tags.
For example, if you run:
jamz ~/Music/Nirvana/Nevermind/ '{jamz_padded_tracknumber} - {title}.flac'
Your Nevermind songs will now be named:
01 - Smells Like Teen Spirit.flac
02 - In Bloom.flac
03 - Come as You Are.flac
...
12 - Something in the Way / Endless, Nameless.flac
Installation
pip install jamz
Usage
Jamz takes two positional arguments, the directory to rename files in, and the template with which to rename them. For the template, Jamz passes all the tags from each file as formatting arguments, so you can use any tag in your template that the filetype supports. For example, when working with files that use the Vorbis comment format (FLAC, Ogg, etc.), you can use TITLE, ALBUM, DATE, etc. in your template.
jamz /mymusic/ '{ARTIST} - {TITLE} - {TRACKNUMBER}.ogg'
(Note: for this format specifically, jamz also supports using the lowercase version of each tag, e.g. "title")
Special Tags
Jamz also adds a few special tags of its own. Every Jamz special tag starts with jamz.
jamz_padded_tracknumber: The tracknumber (if found) padded to two digits (e.g. 2 -> 02)
jamz_original_suffix: The original suffix of the file, e.g. .flac if the file is named song.flac.
Flags
-r, --recursive Recursively descend the file tree
-d, --dry-run Print the new names of the files, but don't actually rename them
-i, --ignore-errors Skip over files that lead to errors
-v, --verbose Enable verbose logging
Technical Details
Jamz uses Mutagen to read tags. All non-special tags available for use in templates come from the Mutagen tags object. Because Mutagen supports multiple tags per key, Jamz assumes the first value is canonical, and passes only that one to the template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jamz-1.2.1.tar.gz.
File metadata
- Download URL: jamz-1.2.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-27-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5144e6e16c6a776925b05f5d1e70dec72a71e8c05ed5c69fa29ffa7649d8eb1c
|
|
| MD5 |
e51f1a57e24e1718d83dec9e0e416891
|
|
| BLAKE2b-256 |
ad1b908dd551f2133eaf444d5a1c0cdf152cf6b684ffa98022ebab18c05d5a2e
|
File details
Details for the file jamz-1.2.1-py3-none-any.whl.
File metadata
- Download URL: jamz-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-27-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74bc54363e7f3ea235ed43bc1f2f9be5652570a4c5737c0d23ae97903aa86196
|
|
| MD5 |
87e87951b8e769584d33bebf4336e212
|
|
| BLAKE2b-256 |
deaa77571a2ce3b4ebd3350c25f1072f2d609e7bbe28575417a53b8acdb103ac
|