export your firefox keyword to conkeror webjump

I have been using conkeror browser more and more for my browsing needs these days. One of the things that I used in my Firefox browser were the "keyword searches". Conkeror has webjumps which are equivalent to Firefox's keyword searches. I was looking for a way to export my Firefox keyword searches to conkeror's webjums. This is what I came up with

  • Locate your firefox's profile directory.
  • cd to that directory and then do sqlite3 places.sqlite
  • when you have a sqlite prompt, run this sql select keyword,url from moz_keywords left join moz_bookmarks on (moz_keywords.id = keyword_id) left join moz_places on (fk = moz_places.id);
  • you will get a list of your firefox search keywords and urls
     acpan|http://www.annocpan.org/?mode=search;field=Module;latest=1;name=%s
     cpan|http://search.cpan.org/search?query=%s&mode=module
     ar|http://web.archive.org/web/*/%s
    

You can now use your favourite text processing system to generate the webjump definitions. Here is how I used perl to generate the webjumps

sqlite3 -list places.sqlite " select keyword,url from moz_keywords left join moz_bookmarks on (moz_keywords.id = keyword_id) left join moz_places on (fk = moz_places.id)" | perl -lane '($k,$u)=split/\|/;print "define_webjump(\"$k\",\"$u\")"'

This gave me -

define_webjump("acpan","http://www.annocpan.org/?mode=search;field=Module;latest=1;name=%s")
define_webjump("cpan","http://search.cpan.org/search?query=%s&mode=module")
define_webjump("ar","http://web.archive.org/web/*/%s")

Additional information