Present Perfect


Picture Gallery
Present Perfect

Trac and OpenSearch

Filed under: friction,Hacking — Thomas @ 00:36


Every time someone posts a ticket number in #fluendo I have to go to firefox, go my bookmarks toolbar, click Fluendo, click Trac, click Flumotion, wait, then on the page click Search, wait, and type my search term.

Annoyingly slow, all in all.

So, last week I decided I wanted to know how that search dropdown in Firefox works.

Turns out it's really simple - it uses OpenSearch, which is a standard, and also supported by IE7. There's a nice simple page explaining it, and it was easy to set up a simple test (after figuring out that for some reason the xml description only allows http or https URL's, not file://, so you need to set up a web server).

So, with all that information on hand, I got on a plane to Barcelona on Saturday and started to hack. Trac plug-ins make for excellent plane hacking material - Trac is well-designed, relatively easy to browse around in, and plug-ins are usually pretty small, making it easy to get something done in the 75 minutes of computer time I get on a plane.

A big time sink on setting up a plug-in is the "how to get started" part, ie creating the directories, the plugins, setting up test trac, ... So this time I took some notes for me personally - poke me if you think I should make them public.

By the time we got to landing I had a simple prototype working, and I polished it off yesterday.

Then I went on IRC to ask a question on how to do something, and I learnt that the trunk of Trac actually has opensearch support built in. Sweet ! That means I won't have to port this 0.10 plugin to 0.11 when we upgrade.

I fixed up my plugin to be more like the trunk opensearch integration so it will be a seamless transition when the time comes.

I love it when a 2 hour hack reduces the number of steps for an action I do tens of times daily from 9 to 1. I used to think of the technical part of my job as removing friction, and this is definitely a good friction killer.

If you're interested, get the plugin, read the README, and install it.


  1. Firefox has another cool feature that may also be useful to you. It allows you to assign a “search keyword” to any search entry box. So if you go to your trac search form and right click on it and do “Add a keyword for this search” and then give it a keyword (say flu) then you can just type “flu some search terms here” right into the location bar of the browser and it will do the search for you.

    Comment by Ray Strode — 2008-01-14 @ 03:58

  2. If the URL is predictable, why not just use a bookmark? You can put variables into Firefox bookmarks. This is my bookmark for going to a given bug in Mandriva Bugzilla:

    Name: [mb] Mandriva Bugzilla
    Location: http://qa.mandriva.com/show_bug.cgi?id=%s
    Keyword: mb

    The Name is arbitrary. The %s in the location and the keyword do all the work. Together, it means I can just enter ‘mb 23456’ in the URL bar to go to bug #23456 (http://qa.mandriva.com/show_bug.cgi?id=23456).

    Comment by Adam Williamson — 2008-01-14 @ 04:55

  3. […] el post de Thomas Vander Stichele sobre Trac y opensearch (sacaré algún rato para probar su plugin), he leído en los comentarios […]

    Pingback by sin parar de aprender » Blog Archive » Trac & bookmarks — 2008-01-14 @ 13:14

  4. During django sprints there is an irc bot replying to lines with ticket numbers (all # followed by digits) with a link to the ticket and a description. from the comments it appears a chinese guy wrote it, you can probably find the script.


    It’s real useful in developer channels, but if the channel is technical enough it might be handy

    Comment by Tom Vergote — 2008-01-14 @ 18:58

RSS feed for comments on this post. TrackBack URL

Leave a comment