diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-08-14 10:25:14 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-08-14 10:25:14 -0700 |
| commit | 6e88ebdf6a74a2de459c07fd5ab0403c30ff9aa3 (patch) | |
| tree | 5165240f684eaf8b0c353b722d5b0342bf7a0f07 /scripts/split-man | |
| parent | b0489fd741f77e6ef00cf8e07f737db00e97f714 (diff) | |
[PATCH] Docbook: Make mandocs output more terse
From: Michael Still <mikal@stillhq.com>
This patch takes into account requests from various LKML members for the
mandocs output to be more terse. Information about the copyright, and
formatting of the man page is moved into a comment at the start of the
groff output.
Sample output can be found at:
http://www.stillhq.com/linux/mandocs/2.6.0-test3-bk1/
Diffstat (limited to 'scripts/split-man')
| -rw-r--r-- | scripts/split-man | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/split-man b/scripts/split-man index bff727ba2476..7970935a1dee 100644 --- a/scripts/split-man +++ b/scripts/split-man @@ -35,7 +35,7 @@ $refdata = ""; $front = ""; while(<SGML>){ # Starting modes - if(/<legalnotice>/){ + if(/<bookinfo>/ || /<docinfo>/){ $mode = 1; } elsif(/<refentry>/){ @@ -51,14 +51,22 @@ while(<SGML>){ print "Found manpage for $filename\n"; open REF, "> $ARGV[1]/$filename.sgml" or die "Couldn't open output file \"$ARGV[1]/$filename.sgml\": $!\n"; - print REF "<!DOCTYPE refentry PUBLIC \"-//Davenport//DTD DocBook V3.0//EN\">\n\n"; - print REF "$refdata"; + print REF <<EOF; +<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN"> + +<!-- BEGINFRONTTAG: The following is front matter for the parent book --> +$front +<!-- ENDFRONTTAG: End front matter --> + +$refdata +EOF $refdata = ""; } # Extraction if($mode == 1){ - $front = "$front$_"; + chomp $_; + $front = "$front<!-- $_ -->\n"; } elsif($mode == 2){ $refdata = "$refdata$_"; @@ -69,16 +77,8 @@ while(<SGML>){ print REF "<manvolnum>9</manvolnum>\n"; } if(/<\/refentry>/){ - $front =~ s/<legalnotice>//; - $front =~ s/<\/legalnotice>//; print REF <<EOF; <refsect1><title>About this document</title> -$front -<para> -If you have comments on the formatting of this manpage, then please contact -Michael Still (mikal\@stillhq.com). -</para> - <para> This documentation was generated with kernel version $ARGV[2]. </para> @@ -98,7 +98,7 @@ EOF } # Ending modes - if(/<\/legalnotice>/){ + if(/<\/bookinfo>/ || /<\/docinfo>/){ $mode = 0; } elsif(/<\/refentry>/){ |
