.comment-link {margin-left:.6em;}

a hint about my brain

Well it's now a real live blog (well might be ;) )

Friday, March 18, 2005

Boring techy stuff and music

Well since I got a ipod I wanted a way of allowing people to browse through what I have.

so here it is. http://82.10.77.1/testmusic.php Warning it's on a machine at home so it possible, even likely to crash, be turned off, blow up and take Surrey with it, or all of the above.

Techy boring stuff
So how did I do it? Well iTunes can export to xml so I thought that "ah ha that's a new internet type format that'll just go into some web page or something" Urm well no. After wandering around google for a while I found out that Apple used some non standard xml and I would have to write something. And to be honest I don't think it would have as easy as that anyway

As this was so not going to happen I wandered a bit more and found http://codetriangle.com/products/iTunesXmlParser/ but it required DOM XML extension for php which I couldn't find so got bored with that.

I found this http://mac.softpedia.com/get/HTML-Tools/phptunest.shtml
but couldn't get it to download but it did suggest importing it into MySql. Well seeing as I was playing with MySql in my general learning about Linux and Apache, I wondered if I could do that.

This guy http://www.feedface.com/projects/pod2sql.html had already written something which imports the actual iTunes database into mysql so I thought I would give that a go. But I couldn't get the application that does the importing to install (no doubt my fault). However he had created a database dump which is used to create the tables etc. So I ran that and cut down the tables to what I wanted and wandered around his php, html, css files and cut bits out I didn't think I would need. Then realised that he knew what he was doing and changed it all back (but I did learn a bit a php and css which was nice ;) )

iTunes also lets you export a playlist (or the entire library) as a Tab delimited text file. So I played around with excel (this bugged me as I needed to use Excel for data manipulation 'cause Open Office kept opening it in Writer not Calc, probably down to me not knowing what I'm doing), and made a load of seperate tab delimited files for each table, and then imported them.

No doubt in a few days times someone'll make the whole thing far easier but still ;)

Things I want to do to it.
Sort out the duration issue, in the summary it says I have 15 hours of music, iTunes says 10.9 days, so something is a bit off there.
Work out a way of keeping it up to date without have to go through the whole import etc process again.
Generally make it all nice and lovely.
Put it on something that isn't a computer made from bits from the loft (that has also started making an odd noise)

1 Comments:

At 2:42 pm, Blogger dan said...

this is interesting. How can I do it quickly and easily? Also while you're at it, my gmail accepts big huge emails so feel me to email me Creaming Jesus' Guilty By Association, which I only have on lameass tape. You could chuick in River Techa and Temple Of Shite as well, if you really loved me. :). cd is in post. btw

 

Post a Comment

<< Home