Calendar

January 2004
S M T W T F S
« Dec   Feb »
 123
45678910
11121314151617
18192021222324
25262728293031

January 13, 2004

iTunes Parsing is Fun

Posted by tvor @ 10:17 pm

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.

• • •

6 Comments

  1. You must love “Party And Bullshit”. 53 times? That’s insane! But, I am proud, because you have played “Forgotten Days” once. Way to represent!

    Comment by Omallley — January 14, 2004 @ 10:01 am
  2. I have 2 things to say:
    1) shot who in the what now? (which is my obligatory response to any computer jargon)
    and
    2) 100th COMMENT!

    also, I obviously have no life

    Comment by Erin — January 14, 2004 @ 10:35 am
  3. I will be impressed when you add “rating” information, play count, and the ability to separate the lists into your playlists… until then, I’m only mildly amused. ;)

    *jk*

    Comment by Andrew — January 14, 2004 @ 3:03 pm
  4. The rating info and play count are already being stored, I’m just not showing the rating info yet. I’m displaying the play count in the “Most Played” table. I’ll have to add that functionality for showing which playlists I have too. :)

    Comment by Trevor — January 14, 2004 @ 4:13 pm
  5. NOW you’ll just have to make it so I can sync my iPod to your iTunes over teh intarweb. That should just take a weekend to do…

    Comment by Andrew — January 14, 2004 @ 5:52 pm
  6. This is a great site you have here, you must have put alot of work into it. Brandon just loved all the pictures of Sparky. Your apartment could use a girls touch (ha! ha!). We are having a snow day today so there’s no school or work, its works out just fine for everyone. Take Care!!!!!!!!!

    Comment by cousin KIM — January 16, 2004 @ 9:32 am

Comments RSS

Sorry, the comment form is closed at this time.

Powered by: WordPress | Valid XHTML | CSS | RSS Feed