Musort and Muedit are Python-based scripts designed to streamline music file organization and metadata management. muedit.py enables interactive editing of music file metadata, while musort.py renames files based on metadata fields, helping to keep your music library organized.
Ensure Python 3 is installed, then install the required packages:
pip install mutagen coloramaFor metadata editing, make sure ffmpeg is installed:
# Install ffmpeg on Ubuntu
sudo apt install ffmpeg
# Install ffmpeg on MacOS
brew install ffmpegUse muedit.py to view and edit metadata for a single music file or an entire folder interactively.
python muedit.py /path/to/music_or_folder --sortpython muedit.py /music/collection --sort--sort: After editing metadata, this option triggersmusort.pyto rename the files based on chosen metadata fields.
Note:
--sortassumes thatmusort.pyis in the same directory asmuedit.py.
Use musort.py to rename music files based on specific metadata fields.
python musort.py /path/to/music_or_folder -f artist.title -s "-"python musort.py /music/collection -f album.artist -s "_"-f: Sets the renaming format, e.g.,artist.title.-s: Defines a separator between fields (default: "-").
Contributions to musort and muedit are welcome! Please fork the repository and submit a pull request. Make sure to follow standard code formatting and add appropriate comments to new functionality.