Surly and Furly

Applescripts to automatically create a TinyURL for the site in your frontmost browser window.

Surly, short for ‘Short URL’, is trio of scripts that generate a short url (either TinyURL, Metamark, or is.gd). Its counterpart, ‘Furly’, short for ‘Full URL’, is a script to simply grab the full URL from the frontmost browser window. Each sends the grabbed URL straight to your clipboard, and each works automatically with your default browser. The scripts currently support Safari, Camino, and Opera. (Firefox support has been dropped until Firefox 3 supports Applescript again.)

I will modify and create scripts for other URL-shortening services and browsers upon request by email. Also, don’t hesitate to send bug reports — you might get a Sakuzaku pin badge for your trouble.

Inspiration for these scripts is owed to the aforementioned Dr. Drang, to whom I extend many thanks. Thanks also to Daniel Bogan of Waferbaby, who provided testing and debugging.

Installation

Grab all the scripts in one easy-to-download package:

Or, you can browse the source directly.

Once downloaded, decompress the file and move the scripts somewhere memorable and appropriate. We suggest the ~/Library/Scripts/ folder (in your home directory). You might have to create this folder if it doesn’t already exist.

Usage

The most convenient way to use these convenient scripts is by keyboard shortcut. Quicksilver is all but dead and LaunchBar is costly, so we recommend FastScripts Lite. Download FastScripts Lite — there’s a link at the bottom of the page — and install it. Once it’s up and running, open the FastScripts Lite preferences and make sure the ‘Automatically launch FastScripts Lite when logging in to this computer’ option is checked off so that your script is always available when you start up. Next, head into the ‘Script Shortcuts’ section of the Preferences and assign a key combo to the script you want. (If you put Surly & Furly in your ~/Library/Scripts/ folder, it should automatically be listed).

Use your key combination, wait a few seconds for the script to work, and paste away!

Changelog

February 14, 2009

The Backstory

Back in November 2007, TinyURL had an outage, and people got nervous. John Gruber endorsed Metamark, and Dr. Drang posted a short script for getting the URL of the frontmost Safari window (or tab, as it were), shortening it with the Metamark URL-shortening service, and storing the result in the clipboard. At the time, we were using Quicksilver and Firefox users (we’re not using either anymore, incidentally), so we created a group of scripts that would work with any default browser and two different URL-shortening services.