diff options
author | John Beppu <beppu@lbox.org> | 2001-02-23 17:51:08 +0000 |
---|---|---|
committer | John Beppu <beppu@lbox.org> | 2001-02-23 17:51:08 +0000 |
commit | e6967b20cb5fac3137701f66af5abb8123e3eedd (patch) | |
tree | 8185e05d49670bcff5212da73d13d74a34c03e11 /docs | |
parent | 3757f98d86b7ad467049e6b0fcd40a865faaa334 (diff) | |
download | busybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.tar.gz busybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.tar.bz2 busybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.zip |
Added some documentation and made --sgml use sgml_from_usage().
pod_from_usage() is the default generator.
Diffstat (limited to 'docs')
-rwxr-xr-x | docs/autodocifier.pl | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index e02bca93e..1190160da 100755 --- a/docs/autodocifier.pl +++ b/docs/autodocifier.pl | |||
@@ -81,7 +81,10 @@ sub sgml_for_usage { | |||
81 | my $name = shift; | 81 | my $name = shift; |
82 | my $usage = shift; | 82 | my $usage = shift; |
83 | return | 83 | return |
84 | "FIXME"; | 84 | "<fixme>\n". |
85 | " $name\n". | ||
86 | "</fixme>\n" | ||
87 | ; | ||
85 | } | 88 | } |
86 | 89 | ||
87 | # the keys are applet names, and | 90 | # the keys are applet names, and |
@@ -135,11 +138,13 @@ foreach (@ARGV) { | |||
135 | } | 138 | } |
136 | } | 139 | } |
137 | 140 | ||
138 | #use Data::Dumper; | 141 | my $generator = \&pod_for_usage; |
139 | #print Data::Dumper->Dump([\%docs], [qw(docs)]); | 142 | if (defined $opt{sgml}) { |
143 | $generator = \&sgml_for_usage; | ||
144 | } | ||
140 | 145 | ||
141 | foreach my $name (sort keys %docs) { | 146 | foreach my $name (sort keys %docs) { |
142 | print pod_for_usage($name, $docs{$name}); | 147 | print $generator->($name, $docs{$name}); |
143 | } | 148 | } |
144 | 149 | ||
145 | exit 0; | 150 | exit 0; |
@@ -166,19 +171,29 @@ This script was based on a script by Erik Andersen (andersen@lineo.com). | |||
166 | 171 | ||
167 | =head1 OPTIONS | 172 | =head1 OPTIONS |
168 | 173 | ||
169 | these control my behaviour | 174 | =over 4 |
170 | |||
171 | =over 8 | ||
172 | 175 | ||
173 | =item --help | 176 | =item --help |
174 | 177 | ||
175 | This displays the help message. | 178 | This displays the help message. |
176 | 179 | ||
180 | =item --pod | ||
181 | |||
182 | Generate POD (this is the default) | ||
183 | |||
184 | =item --sgml | ||
185 | |||
186 | Generate SGML | ||
187 | |||
188 | =item --verbose | ||
189 | |||
190 | Be verbose (not implemented) | ||
191 | |||
177 | =back | 192 | =back |
178 | 193 | ||
179 | =head1 FILES | 194 | =head1 FILES |
180 | 195 | ||
181 | files that I manipulate | 196 | F<usage.h> |
182 | 197 | ||
183 | =head1 COPYRIGHT | 198 | =head1 COPYRIGHT |
184 | 199 | ||
@@ -192,4 +207,4 @@ John BEPPU <beppu@lineo.com> | |||
192 | 207 | ||
193 | =cut | 208 | =cut |
194 | 209 | ||
195 | # $Id: autodocifier.pl,v 1.8 2001/02/23 17:41:41 beppu Exp $ | 210 | # $Id: autodocifier.pl,v 1.9 2001/02/23 17:51:08 beppu Exp $ |