1.617.682.4508

Pythian Blog

The world discusses #Pythian on Twitter. Have a question? Use our hashtag and ask away.

Emergency

24x7 Support

Not a Pythian client but need help now? No problem. Click here.

Are you aware of an existing DBA opening or consulting requirement in your organization? Enter your email for a chance to win one year's access to Safari Books.

  

Ubiquity and Tahiti: Together At Last!

By: Don Seiler

Almost everyone and their mum has been twittering about (or from) Mozilla Labs’ newest creation, Ubiquity. You can get a quick introduction of this firefox extension via their blog post, which has a video tour.

Well, after playing around with the simple stock commands (email, wikipedia search, twittering), I decided it was time for a handy Oracle search function. I emerged from my cave with a pretty basic Ubiquity command that will search the tahiti documentation, and optionally search the documentation for a specific version of Oracle from 9iR2 onward. Right now it will simply take you to the Oracle search results page. If I find that Oracle is providing an API to the tahiti search engine, I may enhance it to include results in the Ubiquity preview pane.

You can load the command in your Ubiquity-enabled browser by visiting this page. Ubiquity users should already see the notice at the top of the page to subscribe to this command. You can view the source code at the end of this post.

Once the command is loaded, open Ubiquity via the hotkeys (alt+space or ctrl+space by default) and type something like “tahiti create database”, then hit Enter. This will take you to the tahiti search results page for “create database” for all versions. If you know you just want the results for 10gR2, type “tahiti create database in 10gR2″ and you’ll be taken directly to those results. Supported versions are 9iR2, 10gR1, 10gR2 and 11gR1. If you leave out the revision (Rn), it will assume the latest revision for that version (e.g. 10g = 10gR2).

Here is a screenshot of some serious ubiquitous action:
Screenshot of Ubiquity and Tahiti command

Here is the source code:

CmdUtils.CreateCommand({
  name: "tahiti",
  homepage: "http://www.pythian.com/",
  author: { name: "Don Seiler", email: "seiler@pythian.com"},
  license: "GPLv2",
  description: "Executes search of Oracle RDBMS documentation.",
  help: "Specify search terms and version (9iR2, 10gR1, 10gR2, 11gR1).  If no version is specified, or specified version is not recognized, all version will be searched.  Specifying a version without a revision will default to the latest revision.",
  takes: {"search term": noun_arb_text},
  modifiers: {in: noun_arb_text},

  preview: function( pblock, term, mods ) {
    var msg = 'Searches tahiti in {$in} for "{$term}".';
    var subs = {term: term.text, in: mods.in.text};

    pblock.innerHTML = CmdUtils.renderTemplate( msg, subs );
  },

  execute: function( term, mods) {
    var searchterm = term.text || CmdUtils.getTextSelection();
    var urlDefault = "http://www.oracle.com/pls/db102/print_hit_summary?search_string={TERM}";
    var url9iR2 = "http://www.oracle.com/pls/db92/db92.drilldown?word={TERM}";
    var url10gR1 = "http://www.oracle.com/pls/db10g/search?word={TERM}";
    var url10gR2 = "http://www.oracle.com/pls/db102/search?word={TERM}";
    var url11gR1 = "http://www.oracle.com/pls/db111/search?word={TERM}";

    var version = mods.in.text || '';
    version = version.toLowerCase();

    var url = '';
    switch(version) {
      case '9i':
      case '9ir2':
        url = url9iR2;
        break;
      case '10gr1':
        url = url10gR1;
        break;
      case '10g':
      case '10gr2':
        url = url10gR2;
        break;
      case '11g':
      case '11gr1':
        url = url11gR1;
        break;
      default:
        url = urlDefault; // Default to all version tahiti search
    }

    url = url.replace("{TERM}", searchterm);
    Utils.openUrlInBrowser(url);
  }
})

4 Responses

  1. John Russell says:

    BTW, the 8.1.7 documentation is available via http://www.oracle.com/pls/tahiti/drilldown?word=...

    >If I find that Oracle is providing an API to the tahiti search engine

    What API do you need? Something more than the RSS format that Eddie is using?

    John

  2. Don Seiler says:

    Exactly. Is RSS available for 10g/9i/8i?

    I’ll look into adding 8.1.7 doc support.

  3. [...] second one “tahiti” is from Don Seiler at the Pythian group. This one has no preview. Thus upon pressing “Enter”, it will redirect to [...]

  4. [...] second one “tahiti” is from Don Seiler at the Pythian group. This one has no preview. Thus upon pressing “Enter”, it will redirect to [...]

Leave a Reply

Start NowWith Pythian - database design, management and emergency handling capabilities...

Pythian Blog

Connecting to Oracle with SQL Server 2005 x64
The quirks of connecting to Oracle from SQL 2005 64
more



Live Updates

pythian: Pythian is now official members of the Microsoft Partner Program. Thanks Peter
more



RSSTestimonials

  • Casey Dyke

    Database Team Manager Service Delivery and Applications , Telstra

    Pythian were recently engaged to take a lead role in a high end infrastructure build project at Telstra. Our requirements were a combination of... more