Until today, the listening right now bit and the last 50 listens page were generated with the help of BlogAmp, a neat little plug-in for WinAmp 2. The trouble was it only worked through JavaScript document.write statements; not exactly best practice. So I figured there must be a server-side way to do things. And there is (but seeing as I don’t have a Mac, iTunes is out of the question).
Enter SongWriter, a plug-in for Windows Media Player 9 (I always found WinAmp 2 a bit unstable on my machine anyway). SongWriter works in a similar way to BlogAmp, but instead of FTPing title and artist in a JavaScript file, SongWriter exposes all the mp3 ID3 info and sends a text file of the current song and an XML file of the recent listens.
Getting the whole thing working was a doddle thanks to PHP’s easy file handling (explained in this excellent DevShed tutorial) and Kevin Donahue’s XML parser. You will need to download version 1.8 of SongWriter (for some reason not yet available on the SongWriter home page).
A few more site tweaks to bore you with. Firstly I have added a second RSS feed which contains summaries of the last 10 posts. I felt this would be good for folks such as Jeremy who actually syndicate news feeds. The feed with the latest 5 full posts remains as is, and may be suitable for those who read blogs offline with software like FeedDemon.
Secondly, I’ve started to mark up automatically all abbreviations (such as HTML) with abbr tags (or acronym tags where relevent) and a title spelling out the initials. I’m not sure how valuable this is, particularly for common initialisms like CSS and XML, as most readers of this blog will know what they stand for, and anyone else probably won’t care. IE/Win readers won’t see any difference but folks using better browsers will see something like this everytime such an abbreviation is encountered. What do you think?
Thirdly, and thankfully lastly, my searchable music catalogue – perhaps the zenith of pointless geekitude – now spits out record label and year as well as the usual gubbins.
Blogging · Music · Clagnut news
Andy McCulloch wrote:
Fabulous, There is no more enjoyable pastime than than to rifle through someone’s record collection. Thanks for a completely useless but utterly entertaining half hour Richard.
Phil Baines wrote:
I found your info on SongWriter quiet handy since I was looking for a toy to do this myself. I have however just noticed that your XML file from SongWriter is not well formed and causing an error.
Not to be picky (im not much for worrying over standards) but surly javascripts document.write is better than not working at all?
Phil Baines wrote:
ps. abbr works with IE 6
“IE/Win readers wont see any difference but folks using better browsers will see something like this”
Just a note.
Phil Baines wrote:
I’m probably gonna get DOSed by you now, but I felt I should say that your XML is working fine again now.
Typical. :)
Nice site by the way. I plan on using some of this stuff when I referb mine.