Robby on Rails: RubyURL through QuickSilverthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2008-01-06T20:44:52-05:00Robby Russellurn:uuid:ee0e9bcc-6160-4913-b181-a5f4c95a7f682008-01-06T20:42:00-05:002008-01-06T20:44:52-05:00RubyURL through QuickSilver<p>When <a href="http://chriszgriffin.com/">Chris Griffin</a> saw <a href="http://www.leancrew.com/all-this/2007/11/shortened_urls_with_quicksilve.html">this post</a>, he wanted to do the same with <a href="http://rubyurl.com">RubyURL</a>. 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.</p>
<p>First, you’ll need a recent version of the ShortURL gem installed.</p>
<p><code>sudo gem install shorturl</code></p>
<p>Then you will want to add the following to <code>~/Library/Scripts/rubyurl.scpt</code>. You will need to create this file.</p>
<pre><code>
#
# 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
</code></pre>
<p>Then you can add this script to run through QuickSilver. For details, jump to the setup process on <a href="http://www.leancrew.com/all-this/2007/11/long_and_shortened_url_scripts.html">this post</a>.</p>
<div class="thumbnail"><a href="http://skitch.com/robbyrussell/rpjk/rubyurl-quicksilver"><img src="http://img.skitch.com/20080107-1uxg37c148kwe4cpm58m14ifwt.preview.jpg" alt="rubyurl quicksilver" /></a><br /><span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080">Uploaded with <a href="http://plasq.com/">plasq</a>’s <a href="http://skitch.com">Skitch</a>!</span></div>
<p>This will make it much easier to paste RubyURLs into my Twitter client, <span class="caps">IRC</span>, etc.</p>
<p>I’ll try to post a more thorough tutorial soon, but wanted to share in the meantime.</p><p>When <a href="http://chriszgriffin.com/">Chris Griffin</a> saw <a href="http://www.leancrew.com/all-this/2007/11/shortened_urls_with_quicksilve.html">this post</a>, he wanted to do the same with <a href="http://rubyurl.com">RubyURL</a>. 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.</p>
<p>First, you’ll need a recent version of the ShortURL gem installed.</p>
<p><code>sudo gem install shorturl</code></p>
<p>Then you will want to add the following to <code>~/Library/Scripts/rubyurl.scpt</code>. You will need to create this file.</p>
<pre><code>
#
# 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
</code></pre>
<p>Then you can add this script to run through QuickSilver. For details, jump to the setup process on <a href="http://www.leancrew.com/all-this/2007/11/long_and_shortened_url_scripts.html">this post</a>.</p>
<div class="thumbnail"><a href="http://skitch.com/robbyrussell/rpjk/rubyurl-quicksilver"><img src="http://img.skitch.com/20080107-1uxg37c148kwe4cpm58m14ifwt.preview.jpg" alt="rubyurl quicksilver" /></a><br /><span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080">Uploaded with <a href="http://plasq.com/">plasq</a>’s <a href="http://skitch.com">Skitch</a>!</span></div>
<p>This will make it much easier to paste RubyURLs into my Twitter client, <span class="caps">IRC</span>, etc.</p>
<p>I’ll try to post a more thorough tutorial soon, but wanted to share in the meantime.</p>