X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fautodocifier.pl;h=3aa838eb40cc74b5ba4f8cb7cf1bd778e30b75dd;hb=41be5b863d57bcc34b47b01559ff5e0fb4c8c683;hp=3a29512373ab6e82435d30abf3641ceacc726a1c;hpb=0380166916de8e54674c8ce7b60287b73107e6e6;p=oweals%2Fbusybox.git diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index 3a2951237..3aa838eb4 100755 --- a/docs/autodocifier.pl +++ b/docs/autodocifier.pl @@ -21,8 +21,13 @@ sub continuation { # regex && eval away unwanted strings from documentation sub beautify { my $text = shift; - $text =~ s/USAGE_NOT\w+\(.*?"\s*\)//sxg; - $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg; + for (;;) { + my $text2 = $text; + $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg; + $text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg; + $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg; + last if ( $text2 eq $text ); + } $text =~ s/"\s*"//sg; my @line = split("\n", $text); $text = join('', @@ -87,6 +92,13 @@ sub pod_for_usage { split("\n", $usage->{example})) . "\n\n" : ""; + # Pad the name so that the applet name gets a line + # by itself in BusyBox.txt + my $spaces = 10 - length($name); + if ($spaces > 0) { + $name .= " " x $spaces; + } + return "=item B<$name>". "\n\n$name $trivial\n\n".