iTunes Parsing is Fun
I used to be a faithful WinAmp user for the past several years but back in October, I decided to try iTunes and haven’t looked back since.
If you aren’t familiar with iTunes, it’s a great piece of software for playing and organizing your music. About a week ago, I decided that I needed to leverage (can you see my corporate talk coming through?) the full power of iTunes, in particular it’s XML Library which stores pretty much any information you’d want for a song. I looked into several parsers but none of them did what I was looking for, plus some of them were full of nasty bugs. This past weekend I wrote my own iTunes parser in php from scratch.
I’m still working out a few bugs but here are some good examples (updated every minute) of what kind of info it can retrieve. I’m trying to make it as automated as possible in case new attributes are added in future versions of iTunes. Currently, my php script only parses through the XML file and inserts all of the info into a MySQL db. I’ll continue to work on it in the next few days and hopefully post the source code here for anyone else who may be interested in iTunes parsing.