Workflow for saving song ratings from iTunes to MusicBrainz

If you, like me, a) have a large collection of music files on your computer and b) you manage (and play) them through iTunes and c) have a MusicBrainz account to do some metadata normalisation, have you thought of this?

Suppose you want to export your ratings to the MusicBrainz server so that eventually you can import them to another music player, let MusicBrainz Picard embed your ratings in the files or just share them (not having them public but still on the server is not possible). Perhaps this could work:

  1. Use MusicBrainz Picard to tag MP3 files with MusicBrainz recording (previously track) identifiers
  2. Export the iTunes library – it will now be a plist XML file
  3. Optional(?): Convert the exported iTunes library to normal XML
  4. Extract a list of file names and MusicBrainz identifiers from the files
  5. Extract a list of file names and ratings from the (converted, if necessary) iTunes library
  6. Send for each of the MusicBrainz identifiers with a rating the rating to the MusicBrainz server

Why haven’t I done this yet? Well, priorities lie elsewhere. I’m not convinced I want all my ratings online, although I may want to use my rating information in other applications in the future. Perhaps they’re of use during the Public Broadcasting hackathon November 9 – what if an application could match me to a radio station playing the music I like?

Step 1 will take a lot of time, because my collection is far from fully covered by MusicBrainz. Step 2 is easy. Step 3 has at least a potential solution. Step 4 can be handled by a shell script that I don’t have yet. Step 5 can be performed by an XQuery or XSLT transformation. Step 6 needs a script that calls the MB REST service with input.

Or are there better ways?