File: make_html_builtinindex

package info (click to toggle)
gri 2.12.26-1
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 5,952 kB
  • ctags: 2,396
  • sloc: cpp: 36,598; sh: 4,196; lisp: 3,764; perl: 1,362; ansic: 1,046; makefile: 606
file content (30 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/local/bin/perl
# Create HTML index from index of pre-installed info page.
# Bug: the @code{} items get lost, too bad.
open(IN, "info -f ./gri.info 'Index of Builtins' |") 
    ||  die "Cannot get 'Index of Builtins'\n";

print "
\@c HTML <!-- newfile BuiltinIndex.html \"Gri: Builtin Index\" \"Builtin Index\" -->
\@c HTML <h1>Builtin index</h1>
\@node   Index of Builtins, Concept Index, Index of Commands, Top

\@c HTML <b>Navigation</b>:
\@c HTML <a href=\"#Top\">next</a>,
\@c HTML <a href=\"#CommandIndex\">previous</a>,
\@c HTML <a href=\"#Top\">parent</a>.

\@itemize \@bullet
";

while(<IN>) {
    next if (/\*\s*Menu:\s*$/);
    if (/\* .*\./) {
        s/\* //;
        s/\.$//;
        s/:\s*/\n ... \@xref{/;
        s/$/}./;
        print "\@item\n $_";
    }
}
print "\n\@end itemize\n";