Real-time iPod scrobbling to iChat
A few months back, I was feeling a bit jealous of all the cool kids in iChat using their music as status messages. I’ve played with this on and off since I first saw the scripts to make this happen on Doug’s Scripts for iTunes. When it was officially added to iChat in the Tiger OS release, I toyed with it some more, but never could really use it on a regular basis since I play music at work on my iPod.
Then one day it hit me- with my jailbroken iPod, I could wirelessly scrobble tracks to last.fm and then pull that data back down and use it for a status message. So, I whipped up a little shell script.
#!/bin/sh
while :
do
osascript -e ‘tell application “iChat” to set status message to (do shell script “curl http://ws.audioscrobbler.com/1.0/user/dfbills/recenttracks.txt | head -n 1 | cut -c12-”)’
sleep 110
done
Download here.
I’m sure this could be cleaner and I’ve been mulling over the idea of setting the data as a variable so that I can display a growl message too, but hey- my contacts in iChat can see my uber-cool status line showing my musical taste and that’s all I set out to do.
You must be logged in to comment on this post (damn those spammers)
