Get Short

Inspired by this helpful post about Alfred, I thought I'd share a quick and easy way to shorten a URL with X.CO using Alfred.

First thing you'll need is your API key, which can be found on the Settings page.

Once you have that, you just need to fill in the Terminal Shortcut like so:

Alfred Settings for the X.CO integration

That "Command" field reads (replace KEY with the API key you copied previously): curl -s http://api.x.co/Squeeze.svc/text/KEY?url={query} | pbcopy

Hit "Save," make it "Silent" by checking that box, and you're ready to shorten. To use it, invoke Alfred, type "x http://your-url-to-shorten.com/", and press Return. Your clipboard will contain the shortened URL.

Another option that works really well is to create a Terminal Shortcut mapped to "xc" that runs the Command "curl -s http://api.x.co/Squeeze.svc/text/KEY?url=$(pbpaste) | pbcopy". This version will pull the source URL from your clipboard, shorten it, and replace it on the clipboard with the shortened form. That is very handy.

[The views expressed on this website/weblog are mine alone and do not necessarily reflect the views of Go Daddy Software, Inc.]

About this Entry

This page contains a single entry by bbrown published on May 31, 2011 12:50 AM.

Log Your Work to a Text File was the previous entry in this blog.

(Barely) Birthday Wishes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Feedback to