Hey everyone. I made a little set of iTunes scripts for myself that I thought I'd share. The bundle name is "iTunes Formatted". Install by placing it in ~/Library/Application Support/Adium 2.0/Scripts/.
Here are the scripts and descriptions of what they do. Note that I designed these scripts around how I name my stuff, so they might not fit your conventions exactly. Feel free to modify them.
%_track_formatted: This returns the name of the track with any double-quote marks replaced with single-quote marks. So if you want to encapsulate the song name in double-quotes, it won't look weird.
%_artist_formatted: Returns the string "by [artist name]".
%_album_formatted: Checks to see if the album of the current track is a soundtrack (that is, contains the string "Soundtrack"). If not, it returns the string "from the album \"[album name]\"". If it is a soundtrack, the script returns the string "from the [album name]". So if you're listening to a song with album tag "Crimson Tide Original Soundtrack", the returned string will be "from the Crimson Tide Original Soundtrack".
%_nowplaying_formatted: Returns a string of full information of the form "Listening to [track] by [artist] from [album]". Note that this string's length will frequently exceed the 55-character limit in AIM status messages.
%_nowplaying_truncated: Returns the same string as above, only it will intelligently shrink the string down to the 55-character limit for AIM status messages. You should use this script for status messages in 0.8. If the track selection is from a soundtrack, the artist name is neglected. An example of the return string for a soundtrack would be "Listening to \"Jack on the Move\" from the 24 Original Soundtrack". An example for a non-soundtrack return would be "Listening to \"American Idiot\" by Green Day from the album \"American Idiot\"".
If the string is over 55 characters, it will strip out anything between parentheses in the track name. So if you have a track "Go (Best Remix)", and its total string is over 55 characters, the first thing the script will do is remove the "(Best Remix)" substring. It will then remove the word "Original" from the album. So "24 Original Soundtrack" would become "24 Soundtrack."
If the string is still more than 55 characters, the album name will be stripped out entirely and replaced with just the artist name. If the string is still more than 55 characters, the string will be shrunk to its first 50 characters with a trailing ellipsis on the end.
If iTunes is not open or iTunes is stopped, the script returns the string "Not listening to anything right now." If iTunes is paused, the script returns the string "Paused on ..." followed by the song information conforming to the same rules listed above.
DOWNLOAD
Some new iTunes scripts
Some new iTunes scripts
Damien Sorresso

