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.
```text
#
# 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.
::: thumbnail
[Uploaded with plasq’s
Skitch!]{style=”font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080”}
:::
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.