This is my personal tool for synchronizing the music genres of tracks in the iTunes Library with data from web services (Last.fm, Spotify). Currently, only Windows is supported.
Set Last.fm API and Spotify API credentials to data/input/credentials.yaml
.
Collect music genres of artists registered in iTunes Library from web services.
python collect_artists_data.py 'path/to/iTunes Library.xml'
Based on the data gathered, determine new genres and create a patch file to apply changes.
python generate_genre_patch.py
The patch file is output to data/output/genre_patch.csv
. The artists whose status is 'ready' will be the target of the music genre change.
Apply the patch file to the iTunes Library to update genres. Use the iTunes COM Interface to control iTunes.
python apply_genre_patch.py 'data/output/genre_patch.csv'