tag-album.py
is a tool for batch updating the album and artist metadata of MP3 files in a specified folder.
This tool helps MP3 players, such as VLC, organize music files better by:
- Sorting MP3 files into the correct albums
- Sorting MP3 files by the correct artists
# Basic usage
python tag-album.py -f /path/to/folder -a "Album Name" -r "Artist Name"
# Example with specific folder and album/artist names
python tag-album.py -f /music/rock/ -a "Greatest Hits" -r "Queen"
# Example with a different folder and album/artist names
python tag-album.py -f /music/pop/ -a "Greatest Hits" -r "Taylor Swift"
# Show list of all mp3 files in plain text
python tag-album.py -f /music/rock/ --show
# Show list of all mp3 files in HTML format (no style)
python tag-album.py -f /music/rock/ --show --html
Argument | Description |
---|---|
-f |
Specifies the folder containing MP3 files |
-a |
Sets the album name for the MP3 files |
-r |
Sets the artist name for the MP3 files |
--folder |
Specifies the folder containing MP3 files |
--album |
Sets the album name for the MP3 files |
--artist |
Sets the artist name for the MP3 files |
--show |
Displays the current metadata of the MP3 files |
--html |
Outputs the metadata in HTML format |
To set up a virtual environment and install the required packages for tag-album.py
, follow these steps:
-
Create a virtual environment:
python -m venv env
-
Activate the Virtual Environment:
- On Windows:
.\env\Scripts\activate
- On Unix or MacOS:
source env/bin/activate
- On Windows:
-
Install the Required Packages:
pip install -r requirements.txt
Make sure you have a requirements.txt
file in the same directory as tag-album.py
with all the necessary dependencies listed.
Once the virtual environment is set up and the packages are installed, you can run the script as shown in the example usage section.