I’ve taken inspiration from Leo Laporte’s “hotclock.scpt” and have developed a TWiT Army Notifier. This script requires Mac OS X, Quicksilver, and (optimally) Growl. All of this is free.

To execute this you have to open the Script Editor in the Application folder, copy and paste the following code into the editor, then press Save As under the File menu. Select Application and check the ‘Stay Open’ option…

*NOTE: I accept no responsibility to what you chose to do with this.
--Brad Arsenault of bradarsenault.com
--Written in January 2009
--Use freely with reference credit
--Don't forget to save as "stay open" on the save options.
--version 0.95
--This shows you the latest entry of the TWiT Army Public Feed.

set curlURL to “http://army.twit.tv/api/statuses/public_timeline.atom”
repeat
get_status(curlURL)
set toShow to the result

delay 60 –do not set lower.

get_status(curlURL)
set XMLresult to the result
if XMLresult is not equal to toShow then
set nName to “Notice”
set showMessage to toShow
set messageTitle to “TWiT Army Notice:”
notifyMe(messageTitle, showMessage, nName)
delay 30 –do not set lower
else
set nName to “Other” –These lines have been left as debug code.
set showMessage to “is the same” –These lines have been left as debug code.
set messageTitle to “TWiT Army Debug: IS THE SAME!” –These lines have been left as debug code.
notifyMe(messageTitle, showMessage, nName) –These lines have been left as debug code.
delay 10 –do not set lower
end if
end repeat

–sub-routines below

on get_status(curlURL)
do shell script ("curl " & curlURL)
set curlResult to the result
set xml_file to curlResult
parse_xml(xml_file) --see below
set XMLresult to the result
return the XMLresult

delay 5 --cofigure here to wait a custom amount of time
end get_status

on parse_xml(xml_file)
set P to paragraphs 5 thru 5 of xml_file --6 thru 6 for a single user
set tid to AppleScript's text item delimiters
set tData to {}

repeat with oneP in P
set AppleScript's text item delimiters to ">"
set aPart to text item 2 of oneP --try experimenting with this #
set AppleScript's text item delimiters to "/"
set end of tData to text item 1 of aPart --and this #.
end repeat
set AppleScript's text item delimiters to tid
--this seperates the two parts of this.
--set thefile to "Hi my mame is joe!" as Unicode text

--this part removes whatever garbage is left after the text you want: for the user feed it shows '
--and for the public feed it shows '' infront of the text.
set ditd to text item delimiters
set text item delimiters to "
set textItems to text items of aPart
set text item delimiters to " "
if (class of aPart is string) then
set res to textItems as string
else -- if (class of TheString is Unicode text) then
set res to textItems as Unicode text
end if
set text item delimiters to ditd
return the res --the result
end parse_xml

on notifyMe(messageTitle, showMessage, nName)
tell application "GrowlHelperApp"
set the allNotificationsList to ¬
{"Other", "Notice"}

set the enabledNotificationsList to ¬
{"Notice"} --add "Other" in there to see all checks this app makes.

register as application ¬
"Growl TWiT Army Notice" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "TWiT Live Desktop"

notify with name ¬
nName title ¬
messageTitle description ¬
showMessage application name ¬
"Growl TWiT Army Notice" sticky ¬
true --this makes the notices stay on teh screen until you click them.
--tell application "Quicksilver"
-- show large type messageTitle

end tell
end notifyMe

------------You can select between Growl and Quicksilver as a display method.--------------------------
-----------------"You only have to use the comment tags, two hyphens "--" before the code
-----------------------and remove the comment tags on the code you want to enable.

--on notifyMe(messageTitle, showMessage, nName)
--if nName is "Notice" then
--tell application "Quicksilver"
-- show large type showMessage
--end tell
--else
--end if
--end notifyme

Feel free to poke around with this code, I’ve added comments for those who are interested: they do not affect the program running.

Google Buzz

Post to Twitter Post to Delicious Post to Digg Post to Ping.fm Post to Reddit Post to StumbleUpon