Re: Script greasmonkey to navigate in Haproxy docs ...
Ignoring the fact that some else (http://www.mail-archive.com/haproxy@formilux.org/msg02764.html) had a similar idea, I pushed a public Git repo of the docs in Markdown format. I've only used a few simple regexes, which I lazily dumped in the repo as well, as well as a healthy dose of manual labor. There are still some glitches here and there, but it's a good start overall. Unfortunately Github strips the anchors I've inserted to navigate the docs, but any other markdown converter should do it nicely (I'm using Wolf Rentzsch "Markdown Live" on osx). Help yourselves: https://github.com/tmslnz/HAProxy_Markdown ~~~ tommasolanza.com +44 772 1692021 @tmslnz
Re: Script greasmonkey to navigate in Haproxy docs ...
On Don 29.04.2010 08:41, Aleksandar Lazic wrote: how about to use: http://txt2html.sourceforge.net/ I will try it today and post the results. forget it this produces to much crap ;-( BR Aleks
Re: Script greasmonkey to navigate in Haproxy docs ...
Le 27/04/2010 10:33, Damien Hardy a écrit : > 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 > > Next step : > search the options, add anchor. Search "See also", add links to > conresponding option/anchor... add a search engine ... > > Feel free free to use/modify it. > > Best regards, > Hi all, I've done some improuvment of the pattern detection in the script (the regex for options is writeonly /o\ now unreadable). And add some features like the options search engine (textbox top/right with google sugguest like display in a green div) and "See also" options reference clickable. I keep the same design spirit of the original doc ... it's austere. (some could say ugly) i concentrate on features. Feel free to add your own usercss ^^ -- Damien
Re: Script greasmonkey to navigate in Haproxy docs ...
Hi all, On Mit 28.04.2010 23:16, Cyril Bonté wrote: 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 ! [snipp] OK, I'll try to work on it this week-end to provide a simpler version "soon" (maybe without table detection for the moment). how about to use: http://txt2html.sourceforge.net/ I will try it today and post the results. BR Aleks
Re: Script greasmonkey to navigate in Haproxy docs ...
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é
Re: Script greasmonkey to navigate in Haproxy docs ...
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. Best regards, Willy