Re: Script greasmonkey to navigate in Haproxy docs ...

From: Cyril Bonté <cyril.bonte#free.fr>
Date: Wed, 28 Apr 2010 23:16:05 +0200


Hi all,

Le mardi 27 avril 2010 22:31:10, Willy Tarreau a écrit :
> Hello Damien,
>
> On Tue, Apr 27, 2010 at 10:33:41AM +0200, Damien Hardy wrote:
> > Hello all,
> >
> > haproxy docs are quite difficult to manipulate.
> >
> > I had begun a Greasemonkey
> > (https://addons.mozilla.org/fr/firefox/addon/748) script to create a
> > "clickable" ToC in the haproxy documentation ...
> >
> > You can DL it at http://userscripts.org/scripts/show/75315
>
> Cool, thanks for your interest in the doc! You may want to join
> efforts with Cyril Bonté (CC'd) who showed me an impressive HTML
> conversion of the doc. I believe some of the processing was still
> by hand, but there's definitely some good stuff there.

Yes, during the 1.4-rc version I was working on a python script to convert the doc into html. It's still in an ugly state and it's difficult to find time to clean the code :-) It could be interesting to share the ideas !

Currently, the script is able to :

- add links on sections
- detect tables and render them into html, this is the part of the code that should be rewritten, it's a nightmare to read ;-)
- detect keywords in the text and transform them into links to point to their documentation part (everywhere and in the "See also" parts). I still have some false-positives due to keywords like "maxconn" that are used in several contexts (will try to add locality detection).
- colorize keywords parameters (optional, required, choices)
- mark deprecated keywords

This is also useful to detect keywords missing in the keywords matrix, differences between each "May be used in sections" and the matrix, and to find lines that don't follow the document format (tabulations, more than 80 characters, ...) I'd also like to detect examples.

OK, I'll try to work on it this week-end to provide a simpler version "soon" (maybe without table detection for the moment).

-- 
Cyril Bonté
Received on 2010/04/28 23:16

This archive was generated by hypermail 2.2.0 : 2010/04/28 23:30 CEST