A collection of Python scripts to clean, organize, and manage your music library.
Supports MP3 and OPUS formats with functionalities for duplicate detection, renaming, tagging, and library classification.
A music library organizer that classifies audio files by comparing them against an existing library.
- Cleans and normalizes filenames (removes unwanted keywords and symbols)
- Compares source files with a reference library (
biblioPath) - Copies matches into an output directory
- Handles duplicates and logs classification details
- Provides a "second chance" mode with looser matching rules
Detects and logs duplicate MP3 files in a given directory.
- Uses fuzzy filename matching (
difflib.SequenceMatcher) - Generates an
exeLogfile listing suspected duplicates - Helps keep libraries clean by identifying near-identical files
Utility script to rename MP3 files according to specific rules.
- Example: remove download site aliases (
y2meta.com -) - Example: append or prepend artist names
- Example: swap
Artist - SongintoSong - Artist - Non-MP3 files are moved into a
unknownFilesfolder
Cleans MP3 filenames and writes proper ID3 tags using mutagen.
- Expected filename format:
Song - Artist.mp3 - Updates ID3 tags:
title→ Songartist→ Artist
- Renames files to ensure consistency
- If format is unknown → file moved to
unknownDir - If tagging/renaming fails → file moved to
unknownFiles
Same functionality as mp3_tag_cleaner.py, but for OPUS files using music-tag.
- Expected filename format:
Song - Artist.opus - Writes metadata tags:
title→ Songartist→ Artist
- Handles unknown and problematic files by moving them to
unknownDirorunknownFiles
Install the required dependencies:
pip install mutagen music-tag- Works with Python 3.7+
- Uses only standard libraries +
mutagen+music-tag
Run any script from the terminal:
python mp3inator.py
python mp3_deduplicator.py
python audio_file_renamer.py
python mp3_tag_cleaner.py
python opus_tag_cleaner.pyEach script will ask for a directory path containing your music files.
During execution, the scripts may create these folders:
unknownDir/→ files with unexpected filename formatsunknownFiles/→ files that caused errors or are not supported
- Make a backup of your music library before using these tools.
- These scripts modify filenames and metadata directly.
- They are designed for personal use and tested on small to medium libraries.