Well, I got curious so I went ahead and wrote up a little script to grab some basic stats from my iTunes data. I figured others might be interested in this as well, so I’ve packaged it up as a download.
What it does right now:
- Imports a Library.xml export from iTunes into a MySQL database.
- Runs a couple of queries as example reports.
This is totally unpolished at this point and requires PHP 5+ and MySQL 4+.
- At the top of the index.php file is the SQL for creating your database.
- After you create your database, put your database settings in the config.inc.php file.
- Export your iTunes music as ‘Library.xml’ and put the Library.xml file into the itunes_stats folder.
- Load the index.php page in your browser and click on the “Load data” option to import the XML into MySQL.
- Click on reports, etc.
I’ve added forums for ideas/mods/support. I’d love for you to write your own reports and send them in or post them in the forums.