Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

RubyURL through QuickSilver

Posted by Mon, 07 Jan 2008 01:42:00 GMT

When Chris Griffin saw this post, he wanted to do the same with RubyURL. Since the ShortURL gem was broken, I didn’t get a chance to dive into it. However, with the shorturl command now working again with RubyURL, we get QuickSilver and RubyURL working together really quickly.

First, you’ll need a recent version of the ShortURL gem installed.

sudo gem install shorturl

Then you will want to add the following to ~/Library/Scripts/rubyurl.scpt. You will need to create this file.


  #
  # Change accordingly if shorturl is not under /usr/bin/shorturl
  #
  set shorturl_cmd to "/opt/local/bin/shorturl" 

  tell application "Safari" 
      set original_url to URL of front document
  end tell

  set cmd to shorturl_cmd & " " & original_url

  set ruby_url to do shell script cmd
  set the clipboard to ruby_url as text
  beep

Then you can add this script to run through QuickSilver. For details, jump to the setup process on this post.

rubyurl quicksilver
Uploaded with plasq’s Skitch!

This will make it much easier to paste RubyURLs into my Twitter client, IRC, etc.

I’ll try to post a more thorough tutorial soon, but wanted to share in the meantime.