Skip to content
chriswood edited this page Sep 13, 2010 · 10 revisions

So this is the beginning of a project that I hope will be useful for office type networks, where a lot of people have shared itunes libraries. Right now all this does is parse your library (actually a test one at the moment, but you can easily change that by removing a comment), and print a few things about each track. I hope to store this info in a central database, and then make an interface to get various information out of it. The main thing I want to be able to do is search among various users for a song easily, but also some statistics of what is the most popular tune, etc… would be fun. I figure this main script will be something that runs here and there when you do stuff with the main interface maybe, to keep stuff up to date without being annoying.

To use this at the moment, just run…
python read_tunes.py user

Ok I cleaned things up, and a added an (as yet unused) sqlite wrapper. The next thing I want to do is actually get crap stored on a local db, and start flushing out just what that should look like. If figure it would be cool to have the basic songs table, then a join table for each user. Then maybe a seperate stats table. That way the song table will stay “skinnyish” maybe? I figure that one could get medium sized pretty quick (like 100000+ rows, I guess that is medium). And the users-song join table could get even bigger, so it would be like 2 columns or something.

After that stuff is reasonably worked out the next thing would be to start figuring out how to do updates to the db periodically, only sending what is new. I have heard suggestions of using a git repo, but if at all possible it would be cool if a user didn’t have to install anything as long as they have python2.5. But I guess somehow or another something will have to be added to push info up to the central server here and there, or as someone wants to.

==edit 1/25/09 ==
I split things out a little more, and got the sqlite wrapper more fleshed out. Also your user is now stored in the database (the one you have to already have existing in the settings file :)). I plan on getting the initial read_tunes file populating the database with songs next, and setup the join table for users/songs.

chris

Clone this wiki locally