[Doxygen-develop] Opensearch provider for doxygen docs
Brought to you by:
dimitri
From: Phil L. <phi...@sq...> - 2011-07-22 01:47:18
|
Hi Dimitri, Just wondering if everything was OK with my patch, or if you'd like me to make changes? Phil ---------- Forwarded message ---------- From: Phil Lello <phi...@sq...> Date: 13 July 2011 23:29 Subject: Re: [Doxygen-develop] Opensearch provider for doxygen docs To: Dimitri Van Heesch <do...@gm...> Hi Dimitri, I think that file (src/search_functions.h) came from a typo... nothing is using it. I have a vague recollection it was incorrectly generated at one point instead of search_functions_php.h I deleted the file from my local copy, ran distclean, and built everything OK without it, including a clean build of docs on a test project, so that file isn't needed. Best Wishes, Phil On 13 July 2011 14:52, Dimitri Van Heesch <do...@gm...> wrote: > Hi Phil, > > Thanks for your patch. > > I still have to look into your patch in detail, but I observed something > odd: > the file src/search_functions.h file has size 0, was that intentional? > > $ tar tvf opensearch-patch-to-r767.tar > -rw-r--r-- 0 phil phil 0 Jun 21 15:00 src/search_functions.h > -rw-r--r-- 0 phil phil 4642 Jun 23 06:05 src/libdoxygen.t > -rw-r--r-- 0 phil phil 9631 Jun 23 05:47 src/search_functions.php > -rw-r--r-- 0 phil phil 11466 Jun 23 05:47 src/search_functions_php.h > -rw-r--r-- 0 phil phil 3268 Jun 24 01:03 src/search_opensearch.php > -rw-r--r-- 0 phil phil 5910 Jun 23 06:06 src/libdoxygen.pro.in > -rw-r--r-- 0 phil phil 125024 Jun 24 00:59 src/htmlgen.cpp > -rw-r--r-- 0 phil phil 54231 Jun 23 06:06 winbuild/Doxygen.vcproj > > Regards, > Dimitri > > On Jul 13, 2011, at 4:49 , Phil Lello wrote: > > > On 21 June 2011 17:10, Dimitri Van Heesch <do...@gm...> wrote: > > Hi Phil, > > > > On Jun 21, 2011, at 4:13 , Phil Lello wrote: > > > > > 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? > > > > Sounds sensible. I'm interested in your changes. > > From an end-user point of view there will be no visible changes other > than the opensearch feature, right? > > > > Regards, > > Dimitri > > > > > > Hi Dimitri, > > > > Yes, this version should be transparent. As I've renamed 2 files, a > straight SVN diff won't apply to a fresh checkout, so I've created a tarball > of my changed files instead. > > > > The affected files are: > > A + src/search_functions.h > > M src/libdoxygen.t > > D src/search.php > > D src/search_php.h > > A + src/search_functions.php > > A src/search_functions_php.h > > A src/search_opensearch.php > > M src/libdoxygen.pro.in > > M src/htmlgen.cpp > > M winbuild/Doxygen.vcproj > > > > To reduce the generated PHP code, I've moved some decision logic out into > PHP, and the relevant config settings get generated. Hopefully this won't > cause too much confusion. > > > > I've attempted to patch the non-gcc build files; as I'm in a pure Linux > environment, I can't test them. I needed to rebuild libdoxygen before > building doxygen proper, as the dependencies don't seem quite right - I've > not attempted to fix that as I the svn checkin includes some of the > generated files, and I didn't want to bloat my changeset. > > > > This should all be transparent to users, with the exception that if they > use the browser option to add a search provider, doxygen docs will become > searchable. A more powerful search suggestions feature would be nice to add > at a later date, but as I've been working on different things for a few > weeks, I thought it was best to submit now. > > > > Let me know how it looks (or if I've broken something!) - in firefox, it > should just be a case of going to the search-engine list next to the > quick-search box, and checking 'add'. Just in case it isn't obvious, this > requires server-side searches in Doxyfile to work. > > > > > > <opensearch-patch-to-r767.tar> > > |