File: make_html_commandindex

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 (31 lines) | stat: -rw-r--r-- 875 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
31
#!/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 Commands' |") 
    ||  die "Cannot get 'Index of Commands'\n";
# Following is kludge, really
print "
\@c HTML <!-- newfile CommandIndex.html \"Gri: Command Index\" \"Command Index\" -->
\@c HTML <h1>Command index</h1>
\@node   Index of Commands, Index of Builtins, License, Top

\@c HTML <b>Navigation</b>:
\@c HTML <a href=\"#BuiltinIndex\">next</a>,
\@c HTML <a href=\"#ConceptIndex\">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";
#print "\n\@c HTML Dan Kelley\n";