Gentoo Archives: gentoo-dev

From: Federico Ferri <mescalinum@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Stats test server running, please check it out
Date: Tue, 11 Aug 2009 17:22:11
Message-Id: 4A81A8AC.5010903@gentoo.org
In Reply to: Re: [gentoo-dev] Stats test server running, please check it out by Sebastian Pipping
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Sebastian Pipping wrote:
5 > Federico Ferri wrote:
6 >> FEATURES
7 >> can link feature to make.conf man page:
8 >> http://linuxreviews.org/man/make.conf/ (unfortunately this man page is
9 >> rendered with no anchors over variable/features, so you could do
10 >> better ^__^
11 >
12 > the output of neither
13 >
14 > # man2html -r make.conf.5 > make.conf.5.html
15 >
16 > nor
17 >
18 > # groff -man -Thtml make.conf.5 > make.conf.5.html
19 >
20 > make me really happy
21 >
22 > do you know any alternative coming with more anchors and external CSS
23 > support?
24
25 # nope for css, but you could do something like this:
26 # imagine you have the feature list in a file
27 # (I don't know how to extract it automatically, but perhaps someone does)
28
29 $ cat featurelist
30 assume-digests
31 buildpkg
32 buildsyspkg
33 ...
34 userpriv
35 usersandbox
36 usersync
37 webrsync-gpg
38
39 $ bzcat /usr/share/man/man5/make.conf.5.bz2 | man2html -r > make.html
40
41 # basically now you have to match <DT><B>featurename</B>
42 # and add a anchor tag to it:
43
44 $ eval `echo sed; cat featurelist | sed 's,^\(.*\),-e
45 '\''s:<DT><B>\1</B>:<DT><B><A NAME="feature_\1">\1</A></B>:'\'',';
46 echo make.html` > make_anchors.html
47
48 this will give you anchor to features, e.g.
49 make_anchor.html#feature_buildpkg
50
51
52 a bit tricky the sed - could be easier, but this version is fast
53 because it builds a giant sed expression instead of calling sed n times.
54
55 - --
56 Federico Ferri
57
58 -----BEGIN PGP SIGNATURE-----
59 Version: GnuPG v2.0.11 (GNU/Linux)
60 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
61
62 iEYEARECAAYFAkqBqKwACgkQV/B5axfzrPsegwCdFo95i26IF9+jeUSLntVI4nhS
63 msgAnRw4I4D1MwPUf1yBY8gJh3PHtX9S
64 =cx8u
65 -----END PGP SIGNATURE-----