Fix some doc generation problems
This commit is contained in:
parent
ed43806c3b
commit
55c704c119
@ -3,7 +3,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
# collect lines continued with a '\' into an array
|
# collect lines continued with a '\' into an array
|
||||||
sub continuation {
|
sub continuation {
|
||||||
my $fh = shift;
|
my $fh = shift;
|
||||||
my @line;
|
my @line;
|
||||||
@ -26,7 +26,7 @@ sub beautify {
|
|||||||
$text =~ s/"\s*"//sg;
|
$text =~ s/"\s*"//sg;
|
||||||
my @line = split("\n", $text);
|
my @line = split("\n", $text);
|
||||||
$text = join('',
|
$text = join('',
|
||||||
map {
|
map {
|
||||||
s/^\s*"//;
|
s/^\s*"//;
|
||||||
s/"\s*$//;
|
s/"\s*$//;
|
||||||
s/%/%%/g;
|
s/%/%%/g;
|
||||||
@ -42,10 +42,17 @@ sub pod_for_usage {
|
|||||||
my $name = shift;
|
my $name = shift;
|
||||||
my $usage = shift;
|
my $usage = shift;
|
||||||
|
|
||||||
|
# Sigh. Fixup the known odd-name applets.
|
||||||
|
$name =~ s/dpkg_deb/dpkg-deb/g;
|
||||||
|
$name =~ s/fsck_minix/fsck.minix/g;
|
||||||
|
$name =~ s/mkfs_minix/mkfs.minix/g;
|
||||||
|
$name =~ s/run_parts/run-parts/g;
|
||||||
|
$name =~ s/start_stop_daemon/start-stop-daemon/g;
|
||||||
|
|
||||||
# make options bold
|
# make options bold
|
||||||
my $trivial = $usage->{trivial};
|
my $trivial = $usage->{trivial};
|
||||||
$trivial =~ s/(?<!\w)(-\w+)/B<$1>/sxg;
|
$trivial =~ s/(?<!\w)(-\w+)/B<$1>/sxg;
|
||||||
my @f0 =
|
my @f0 =
|
||||||
map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ }
|
map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ }
|
||||||
split("\n", $usage->{full});
|
split("\n", $usage->{full});
|
||||||
|
|
||||||
@ -69,22 +76,19 @@ sub pod_for_usage {
|
|||||||
|
|
||||||
# prepare examples if they exist
|
# prepare examples if they exist
|
||||||
my $example = (defined $usage->{example})
|
my $example = (defined $usage->{example})
|
||||||
?
|
?
|
||||||
"Example:\n\n" .
|
"Example:\n\n" .
|
||||||
join ("\n",
|
join ("\n",
|
||||||
map { "\t$_" }
|
map { "\t$_" }
|
||||||
split("\n", $usage->{example})) . "\n\n"
|
split("\n", $usage->{example})) . "\n\n"
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
return
|
return
|
||||||
"=item B<$name>".
|
"=item B<$name>".
|
||||||
"\n\n" .
|
"\n\n$name $trivial\n\n".
|
||||||
"$name $trivial".
|
"$full\n\n" .
|
||||||
"\n\n" .
|
"$notes" .
|
||||||
$full .
|
"$example" .
|
||||||
"\n\n" .
|
|
||||||
$notes .
|
|
||||||
$example.
|
|
||||||
"-------------------------------".
|
"-------------------------------".
|
||||||
"\n\n"
|
"\n\n"
|
||||||
;
|
;
|
||||||
@ -101,7 +105,7 @@ sub sgml_for_usage {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
# the keys are applet names, and
|
# the keys are applet names, and
|
||||||
# the values will contain hashrefs of the form:
|
# the values will contain hashrefs of the form:
|
||||||
#
|
#
|
||||||
# {
|
# {
|
||||||
@ -288,4 +292,4 @@ John BEPPU <b@ax9.org>
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# $Id: autodocifier.pl,v 1.24 2003/07/14 21:20:48 andersen Exp $
|
# $Id: autodocifier.pl,v 1.25 2004/03/13 08:32:14 andersen Exp $
|
||||||
|
@ -47,7 +47,7 @@ John Beppu <beppu@codepoet.org>
|
|||||||
Edward Betts <edward@debian.org>
|
Edward Betts <edward@debian.org>
|
||||||
|
|
||||||
expr, hostid, logname, tty, wc, whoami, yes
|
expr, hostid, logname, tty, wc, whoami, yes
|
||||||
|
|
||||||
=for html <br>
|
=for html <br>
|
||||||
|
|
||||||
Brian Candler <B.Candler@pobox.com>
|
Brian Candler <B.Candler@pobox.com>
|
||||||
@ -62,10 +62,9 @@ Randolph Chung <tausq@debian.org>
|
|||||||
|
|
||||||
=for html <br>
|
=for html <br>
|
||||||
|
|
||||||
Dave Cinege <dcinege@psychosis.com>
|
Dave Cinege <dcinege@psychosis.com>
|
||||||
|
|
||||||
more(v2), makedevs, dutmp, modularization, auto links file,
|
more(v2), makedevs, modularization, various fixes
|
||||||
various fixes, Linux Router Project maintenance
|
|
||||||
|
|
||||||
=for html <br>
|
=for html <br>
|
||||||
|
|
||||||
@ -99,7 +98,7 @@ Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
|||||||
|
|
||||||
=for html <br>
|
=for html <br>
|
||||||
|
|
||||||
John Lombardo <john@deltanet.com>
|
John Lombardo <john@deltanet.com>
|
||||||
|
|
||||||
dirname, tr
|
dirname, tr
|
||||||
|
|
||||||
@ -174,4 +173,4 @@ Glenn Engel <glenne@engel.org>
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# $Id: busybox_footer.pod,v 1.12 2003/07/14 21:20:48 andersen Exp $
|
# $Id: busybox_footer.pod,v 1.13 2004/03/13 08:32:14 andersen Exp $
|
||||||
|
Loading…
Reference in New Issue
Block a user