Search Ruby Docs within Safari

January 7th, 2007 -

Working on the Mac, I’ve really become found of using Safari. One thing I wish is that it had the web developer toolbar like firefox has. Firefox is still a great browser, but on the Mac, it just doesn’t look or feel like Mac software. Version 2 of Firefox is a great improvement, but it isn’t quite there and won’t be until version 3.

Another aspect of Firefox that I like is the ability to create customized searches with keywords. Well, Safari can do the same thing with two different plugins – you only need one.

The plugin I’ve chosen is Sogudi because it is quite extensive. First, I’ll show you how to set it up to search the Ruby API and Ruby/Rails docs located at labs.parkerfox.co.uk/ruby.search.

Install Sogudi

First thing you need to do is install “Sogudi”: http://www.kitzkikz.com/Sogudi. Go here and download the correct version for your Mac and install it.

Search Ruby API

Once you’ve installed Sogudi and restarted Safari, go to your Safari Menu option and click on Sogudi.

screenshot
  • Click on the + icon to the top left.
  • In the Shortcut column type core.
  • In the Destination URL type => http://www.ruby-doc.org/core/classes/@@@.html

So now we created a keyboard shortcut called “core” that will search the Ruby Docs. The “@@@” is a placement holder that will take our passed variable as our search string. So, if type core String in the box where you would type the URL and hit return, you’ll be taken to the String Class for Ruby.

Search Several APIs at once

Parker Fox has a great online resource for searching through the following resources:

  • Click again on the + icon to the top left.
  • In the Shortcut column type ruby
  • In the Destination URL type => http://labs.parkerfox.co.uk/ruby.search/search_ruby.cgi?search=@@@

And just like before, if we type ruby form_for (form_for as an example of something we can search) you’ll see several things being returned and can click on the presented links to view the docs.

Have some cool plugins that you use for Safari or some other API searches that you use, share them in the comments section.

Original Article- Finding Help Fast

 

Comments

John Nunemaker

January 24th, 2007

Sweet. I’ve recently been using safari more as my frustration of firefox’s slowness on a mac increases. Thanks for reworking my article for safari.

Robert

January 25th, 2007

John: Firefox is definitely slower on the mac, but I’ve heard that version 3 will take care of all the FF/Mac problems.

Thanks for writing that article and keep up the good work over at Rails Tips!

John Nunemaker

January 25th, 2007

Robert: I hadn’t heard that 3 was going to have speed improvements. I thought they were going to focus on microformats and such. That is good news.

Ryan Heneise

February 3rd, 2007

This is really nice. I have been just using Google, which turns up much more than I usually want when searching for Ruby. Having the keywords is definitely a timesaver.

 

Commenting has been turned off.