Skip to content

Instantly share code, notes, and snippets.

@gruber
Created December 7, 2011 01:09
Show Gist options
  • Save gruber/1440914 to your computer and use it in GitHub Desktop.
Save gruber/1440914 to your computer and use it in GitHub Desktop.
# Copy the URL or tweet ID for a tweet, and the script will send it to Aaron's Twitter Viewer
set _old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/"
set _tweet_url to get the clipboard
set _tweet_id to last text item of _tweet_url
try
get _tweet_id as integer
on error
display alert "“" & _tweet_url & "” doesn't look like a valid tweet ID."
return
end try
set AppleScript's text item delimiters to _old_delims
open location "http://twitter.theinfo.org/" & _tweet_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment