duckduckgo/zeroclickinfo-fathead — pull request #50 by p12tic (2013-06-25 02:18:14+00:00)
Title: C++ standard library reference (cppreference.com)

This pull request is not intended to be applied, for now I just want to gather some feedback :-)

It implements [this idea](https://duckduckhack.uservoice.com/forums/5168-ideas-for-duckduckgo-instant-answer-plugins/suggestions/4119484-c-standard-library-reference).

The plugin works by analyzing the HTML content of the website. The website already [provides a periodically updated archive](http://en.cppreference.com/w/Cppreference:Archives) for offline viewing, so the instead of recursively downloading the live website (which, being wiki, may contain nonsense content at times), the script simply uses the released archive.

Since I'm the maintainer of the said archive, I've used a bit different approach to parse the content than is suggested in the documentation: the plugin calls scripts that (will) come with the archive, instead of invoking parse.xx. This was done because the archive already includes scripts ([github repository](https://github.com/p12tic/cppreference-doc)) that implement much of the functionality needed by the plugin. Additionally, since the HTML content is parsed, the parsing script is complex and strongly coupled with the internal structure of the website, which occasionally changes. If scripts were maintained separately, they would be usable only with specific versions of the archive, which would be harder to manage. I just thought that bundling the scripts would simplify everything a lot. If this approach is not acceptable after all, I can extract the required scripts and put them here.

Currently the abstracts use the absolute minimum space possible: 1-3 lines for the declaration code of the function/class and 1-2 lines for the description, the higher numbers being rare. That hurts usability a bit. What's the reasonable number of lines that the abstract can occupy? Something like 8-10 lines would be great. The additional lines would be used to display additional declarations - some C++ functions have 3-4 overloads with the same name.

All titles currently have the same format: 'c++ ', for example 'c++ std::vector::begin'. What variations (if any) of the title should I include as redirects? Maybe simple 'std::vector::begin' is also enough?

Finally, how to test Fathead plugins? The documentation only talks about Spice and Goodies.