SimpleDaapClient is a Ruby script that connects to a non-Apple DAAP server (though old iTunes probably works), gets a listing and produces an
XSPF playlist of the hosts entire database. The XSPF file contains much of the metadata so that Amarok can display it all. It turned out that Amarok didn't support XSPF files that specified their location. The alternative - to look up the song based on album and artist - was the only thing supported. So I had some fun debugging both the Ruby script that made the XSPF file and the decoder in Amarok at the same time.
I just put what I think are probably the finishing touches to SimpleDaapClient. Yesterday, Mark pointed out that if the recursive solution was too big for the stack, why not just make the stack bigger. Which I did, so I haven't made an iterative solution like I said I would last time. It is just a prototype after all. Though... I probably should find an iterative solution for Amarok itself.
There's something satisfying about writing a Ruby script that uses 3x the memory of kdevelop.
To use SimpleDaapClient.rb, first
download it, make it executable, and find & replace "localhost" with the DAAP server of your choice.
Then bump your stack size and run:
ian@wasabi ~/soc/DAAP/trunk $ su
wasabi trunk # ulimit -s 65536
wasabi trunk # su ian
ian@wasabi ~/soc/DAAP/trunk $ ./SimpleDaapClient.rb
This will create a /tmp/daap.xspf. So, just do something like `amarok /tmp/daap.xspf`. You need Amarok from revision 551863 (the newest at the time of this blog).
And now... back to coding in C++ full time probably. I'll miss you Ruby!
Just started to read an article about the annoyances of websites over at some crappy news site. I’ve taken a second to apply their rules to their own website.
- Invasive advertising
- Flash
- ‘Leap of faith’ links
- “Users have a special hatred of flashing icons and banners”
- “right-column blindness”
A classic example of “do as I say, not as I do”…