An AppleScript to display Technorati rank in Skype

Feb 27, '07 07:30:01AM

Contributed by: abrazell

The following AppleScript does one thing: It queries Technorati for my site's ranking, and updates my Skype mood message with a little ditty about my ranking:

Technosailor.com Technorati Ranking: 2426.

Here's the script; you'll need a Technorati API key and the SatImage XML Parser to make it work:

set trati_apikey to "xxxxxxxxxxxxxxxxxxxxxxxx"
set myblog to "mysitename.com"
set trati_URL to "http://api.technorati.com/bloginfo"
set trati_xml to do shell script "curl -G -d url=" & myblog & ¬
 " -d key=" & trati_apikey & " " & trati_URL

set trati_xml to XMLOpen trati_xml
set the_root to XMLRoot trati_xml
set tapi to XMLChild the_root index 1
set doc to XMLChild tapi index 1
set weblog to XMLChild doc index 2
set rank to XMLChild weblog index 8
set rank to XMLGetText rank

tell application "Skype"
  send command ¬
   "SET PROFILE MOOD_TEXT Technosailor.com Technorati Rank: " & ¬
   rank script name "skypetechnorati"
end tell
While this is probably pointless for most people, it does demonstrate Skype scripting as well as web application API calls. You can read the full post on my blog if you'd like a bit more detail (and a screenshot).

[robg adds: I haven't tested this one.]

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070221094022904