Here is a little script that can be used to tweet your current iTunes song to twitter.
Obviously, add your twitter username and password to get this working.
#!/bin/sh user=""<br />pass="" curl="/usr/bin/curl" name=osascript -e 'tell application "iTunes" to name of current track as string' artist=osascript -e 'tell application "iTunes" to artist of current track as string' message="Now playing $artist - $name on iTunes." $curl --basic --user "$user:$pass" --data-ascii \ "status=echo $message | tr ' ' '+'" \ "http://twitter.com/statuses/update.json" > /dev/null status=$? echo "Your tweet returned a status code of $status" exit 0 |
Thanks to Linux Journal for the curl command and macosxhints.com for the osascript help.