TextExpander: Nice AppleScript Shortcut for bit.ly
We’ve already noted an easy way to get TinyURLs via TextExpander’s AppleScript snippet capabilities.
bit.ly is another URL shortening service that has some very interesting features, like history, thumbnails and click-through stats. Jonathan Berger posted an article at LIVEdigitally on creating a TextExpander AppleScript snippet to quickly generate bit.ly shortcuts.
It works. Here’s the link to his article, bit.lyfied: http://bit.ly/2Oroik ![]()
July 25th, 2008 at 5:22 pm
Or if you’re shrinking the URL of your front-most Safari window, you don’t even have to select/copy it:
tell application "Safari"
set PageURL to URL of front document
end tell
set curlCMD to ¬
"curl --stderr /dev/null \"http://bit.ly/api?url=" & PageURL & "\""
-- Run the script and get the result:
set bitlyURL to (do shell script curlCMD)
return bitlyURL
August 6th, 2008 at 2:33 pm
That’s cool. It can only work in text fields in that front-most Safari window, so it wouldn’t work for pasting in bit.ly URLs into twitter.com in Safari, but great for Twitterific!
August 9th, 2008 at 2:53 am
Just. Wow.
That is too freakin’ awesome! Thanks for an amazing tip!
Copied the whole post into Evernote - you know, for posterity and all
Cheers!!