Mon Nov 30 16:57:10 EST 2009

The NSLU2 as a last.fm to twitter bridge.

This simple script came from the need of updating my twitter status with the songs that I am playing, the trick is that it will only update my profile if the song has been tagged as 'loved' on last.fm. It will also detect if it is Monday and will add the #mm hash.


As you can see I am using bit.ly to shorten the urls of the song, you will need a bit.ly API for this to work. I think what is left is to optimize the script storing the curl requests in a file sort of like a cache and add a routine to detect if it is longer than the 140 charaters allowed by twitte and shorten the text to be posted as the status.r


Spanish version: El NSLU2 como un puente de last.fm a twitter.