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
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
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!
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!!
It seems this no longer works it gives me this instead.
410 Gone
410 Gone
nginx
Bit.ly has changed their login procedure. Please use the Internet Productivity Snippet Group (File > Add Predefined Group) and customize the bit.ly snippet with your account information.