mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
e3dfba8e6c
This is the initial conversion of the AFS Adminstrators Reference into POD for use as man pages. The man pages are now generated via pod2man from regen.sh so that only those working from CVS have to have pod2man available. The Makefile only installs. The pages have also been sorted out into pod1, pod5, and pod8 directories, making conversion to the right section of man page easier without maintaining a separate list and allowing for names to be duplicated between pod5 and pod1 or pod8 (which will likely be needed in a few cases). This reconversion is done with a new script based on work by Chas Williams. In some cases, the output is worse than the previous POD pages, but this is a more comprehensive conversion. This is only the first step, and this initial conversion has various problems. In addition, the file man pages that didn't have simple names have not been converted in this pass and will be added later. Some of the man pages have syntax problems and all of them have formatting errors. The next editing pass, coming shortly, will clean up most of the remaining mess.
39 lines
1.1 KiB
Perl
Executable File
39 lines
1.1 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
#
|
|
# From an AFS Administrative Reference HTML page, try to figure out what
|
|
# command or file it corresponds to and output the appropriate generate-pod
|
|
# command. Intended to be run as follows:
|
|
#
|
|
# generate-file-map *.htm > generate-pods.sh
|
|
#
|
|
# Each line of the output will be a generate-pod invocation, saving its output
|
|
# to the appropriate POD file.
|
|
|
|
my %except = map { $_ => 1 }
|
|
('Table of Contents', 'Audience and Purpose', 'Organization',
|
|
'How to Use This Document', 'Related Documents',
|
|
'Typographical Conventions');
|
|
|
|
for my $file (@ARGV) {
|
|
my $command;
|
|
open (IN, '<', $file) or die "$0: cannot open $file: $!\n";
|
|
while (<IN>) {
|
|
s/<I>//g;
|
|
s%</I>%%g;
|
|
if (/<H2><A [^>]+>([^<]+)/) {
|
|
$command = $1;
|
|
last;
|
|
}
|
|
}
|
|
if ($command) {
|
|
next if $except{$command};
|
|
next if $command =~ /\(AFS version\)/;
|
|
$command =~ s/,.*//;
|
|
$command =~ s/ and.*//;
|
|
$command =~ s/\s/_/g;
|
|
$command =~ s/([\(\)])/\\$1/g;
|
|
print "../../man-pages/generate-pod $file >"
|
|
." ../../man-pages/pod/$command.pod\n";
|
|
}
|
|
}
|