Reverse Shortened URLs with Quicksilver

Note: This post is over 10 months old. You may want to check later in this blog to see if there is new information.

This is a quickie I created whilst working on something else. It allows you to copy a shortened url (urltea, tinyurl, etc.) and hit a key combo to display its destination URL in large type. It could be modified to do a few other things such copying back to the clipboard and could take input in ways other than the clipboard. It’s essentially just a shell command and doesn’t even have to use applescript or quicksilver. Anyway…

Create a new hotkey trigger in Quicksilver preferences. Insert this in the first box of the quicksilver pane (Thanks to Alex for the correction):

tell application "Quicksilver" to show large type (do shell script "curl -Is `pbpaste` | awk '/Location/ { print $2 }'")

Then choose “Run as Applescript” for the action. Assign a hotkey and then go out to Twitter and right click/copy a shortened URL. Hit your key combination and you can preview where the link is going to take you without clicking it. Tinyurl does, of course, have a preview mode, but this is faster, and uses Quicksilver goodness.

» » » » » » »
  1. Alex 10.21.07 / 10pm

    grep Location | awk ‘{print $2}’

    can be shortened to

    awk ‘/Location/ { print $2 }’

  2. brett 10.21.07 / 10pm

    It seems so obvious when you say it ;). Thanks.

  3. Patrick 11.08.07 / 7am

    Thanks for the tip. This really saves time. Greetings

Have your say

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Safari hates me