3 # From an AFS Administrative Reference HTML page, try to figure out what
4 # command or file it corresponds to and output the appropriate generate-pod
5 # command. Intended to be run as follows:
7 # generate-file-map *.htm > generate-pods.sh
9 # Each line of the output will be a generate-pod invocation, saving its output
10 # to the appropriate POD file.
12 my %except = map { $_ => 1 }
13 ('Table of Contents', 'Audience and Purpose', 'Organization',
14 'How to Use This Document', 'Related Documents',
15 'Typographical Conventions');
17 for my $file (@ARGV) {
19 open (IN, '<', $file) or die "$0: cannot open $file: $!\n";
23 if (/<H2><A [^>]+>([^<]+)/) {
29 next if $except{$command};
30 next if $command =~ /\(AFS version\)/;
32 $command =~ s/ and.*//;
34 $command =~ s/([\(\)])/\\$1/g;
35 print "../../man-pages/generate-pod $file >"
36 ." ../../man-pages/pod/$command.pod\n";