OpenSearch for Konqueror SearchBar
Fredy Yanardi
fyanardi at gmail.com
Mon Aug 17 17:42:57 BST 2009
Hi all,
For the past few weeks I've been working to add opensearch[1] support
to konqueror searchbar to replace my own suggestion engine. Opensearch
has an xml formatted open search description, that can contain search
url and suggestion service url.
I changed my previous suggestion engine for konqueror searchbar to use
opensearch specification instead. So, in order to be able to request
suggestion, each searchprovider must have the open search description
xml file. Searchbar will get the suggestion url from the corresponding
description xml, and send the request to the url. The reply will be in
JSON format and then parsed by the searchbar. By using this, we have
common parser for the suggestion reply, and don't need to code the
parser for each searchprovider.
Opensearch also supports autodiscovery, meaning that in the HTML
document of a site, there is a link to the opensearch description for
that site[2]. I also added this autodetection feature to konqueror
searchbar (similar to FF) [3], and additionally, after adding a new
opensearch engine detected from a site, user can quickly set
webshortcut for that new engine[4]. If the newly added opensearch
engine supports suggestion request, the suggestion service can also be
used immediately[5].
Currently the source code resides in my KDE work repository:
http://websvn.kde.org/branches/work/~fyanardi/searchbar-opensearch/.
If you're interested to test it, just compile and install it. To test
open search suggestion engine, you can use google search, the result
is there should be suggestions listed everytime you type something. To
test open search autodetection, you can go to wikipedia or youtube,
after loading finished, if you open the find combo box, you can see
"Add ..." menu.
I'm planning to merge this to the main searchbar source in extragear
after I fix few more small bugs. Any comments or suggestions will be
very much appreciated.
Thanks and Best Regards,
Fredy Yanardi
1. http://www.opensearch.org/Home
2. http://www.opensearch.org/Specifications/OpenSearch/1.1#Autodiscovery_in_HTML.2FXHTML
3. http://lh3.ggpht.com/_9VsSA0K1RyI/SogkIbppgRI/AAAAAAAAAuI/qnaYbmE6eyY/s800/opensearch_add_engine.png
4. http://lh4.ggpht.com/_9VsSA0K1RyI/SogkIkXxM7I/AAAAAAAAAuM/J6MDrZ_2dVY/s800/opensearch_set_shortcut.png
5. http://lh6.ggpht.com/_9VsSA0K1RyI/SogkIlifTgI/AAAAAAAAAuQ/gKMA_DMLnGU/s800/opensearch_wiki_suggestion.png
P.S: Some parser codes are adapted from Arora's opensearch implementation.
More information about the kfm-devel
mailing list