[Doxygen-develop] Opensearch provider for doxygen docs
Brought to you by:
dimitri
From: Phil L. <phi...@sq...> - 2011-06-21 02:13:13
|
Hi all, I have written a prototype implementation of an opensearch provider for doxygen, which allows a doxygen docset to be searched in Firefox (and possibly IE and others) via the browser quicksearch (top-right box on firefox). It could also be extended to allow AJAX-based 'live' searches with server-side searches. I've managed to get this to provide both generic search functionality, as well as implementing search suggestions. Initially this was via manual edits ('gross hacks') to the generated search.php. I'm currently rolling the changes I made to the default search.php into htmlgen.cpp and search.php, and hope to have something to share over the next few days. To reduce the 'gross hack' elements, I've been re-structuring the mix between HtmlGenerator::writeSearchPage() and am approaching a version where the run-time decisions in writeSearchPage are largely writing config, and most decisions are made at run time. To elegantly split functionality for 'normal' search results and 'opensearch' results/suggestions, it would be neatest to split search.php into several parts: - A config.php that holds the config settings(!) - mostly strings from 'theTranslator' or Config_getXXX() - A search-functions.php that holds common code - A search.php that includes config.php and search-functions.php, and is basically the HTML header & footer - An opensearch.php that takes care of the opensearch interface. Does anyone have any objections to this approach, or anticipate resistance from users? Cheers, Phil Lello |