diff options
author | John Beppu <beppu@lbox.org> | 2001-04-17 17:09:34 +0000 |
---|---|---|
committer | John Beppu <beppu@lbox.org> | 2001-04-17 17:09:34 +0000 |
commit | 5d81768cf13a7ecfd5a31e778242a79a0de00d30 (patch) | |
tree | 3180e217448ab429defd12b8f6a78425d1b6738c /docs/autodocifier.pl | |
parent | a3045dfd258b1db2e23eeaaeb6735b297a96941e (diff) | |
download | busybox-w32-5d81768cf13a7ecfd5a31e778242a79a0de00d30.tar.gz busybox-w32-5d81768cf13a7ecfd5a31e778242a79a0de00d30.tar.bz2 busybox-w32-5d81768cf13a7ecfd5a31e778242a79a0de00d30.zip |
- usage.h
o echo_example_usage
needed to escape some backslashes in an inner quote
o find_full_usage
missing a \n at the end of the -name line
? getopt_full_usage
the -o line has tab issues, but I didn't fix them.
o length_example_usage
removed some double-quotes that were within an inner quotes
o printf_example_usage
needed to escape a backslash in an inner quote
o sort_example_usage
needed to escape some backslashes and double quotes in an inner quote
o tftp_full_usage
s/nameing/naming/;
o umount_full_usage
remove colons after options for consistency w/ other full_usage messages
o uniq_example_usage
needed to escape some backslashes and double quotes in an inner quote
- TODO xargs -l ?
- docs/autodocifier.pl POD && comment updates
- docs/busybox_footer.pod added Larry Doolittle and Sterling Huxley
Diffstat (limited to 'docs/autodocifier.pl')
-rwxr-xr-x | docs/autodocifier.pl | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index 2bf7cd8a1..d753300c1 100755 --- a/docs/autodocifier.pl +++ b/docs/autodocifier.pl | |||
@@ -62,12 +62,12 @@ sub pod_for_usage { | |||
62 | } | 62 | } |
63 | my $full = join("\n", @f1); | 63 | my $full = join("\n", @f1); |
64 | 64 | ||
65 | # prepare notes if they exists | 65 | # prepare notes if they exist |
66 | my $notes = (defined $usage->{notes}) | 66 | my $notes = (defined $usage->{notes}) |
67 | ? "$usage->{notes}\n\n" | 67 | ? "$usage->{notes}\n\n" |
68 | : ""; | 68 | : ""; |
69 | 69 | ||
70 | # prepare example if one exists | 70 | # prepare examples if they exist |
71 | my $example = (defined $usage->{example}) | 71 | my $example = (defined $usage->{example}) |
72 | ? | 72 | ? |
73 | "Example:\n\n" . | 73 | "Example:\n\n" . |
@@ -107,6 +107,7 @@ sub sgml_for_usage { | |||
107 | # { | 107 | # { |
108 | # trivial => "...", | 108 | # trivial => "...", |
109 | # full => "...", | 109 | # full => "...", |
110 | # notes => "...", | ||
110 | # example => "...", | 111 | # example => "...", |
111 | # } | 112 | # } |
112 | my %docs; | 113 | my %docs; |
@@ -176,7 +177,13 @@ autodocifier.pl - generate docs for busybox based on usage.h | |||
176 | 177 | ||
177 | =head1 SYNOPSIS | 178 | =head1 SYNOPSIS |
178 | 179 | ||
179 | autodocifier.pl usage.h > something | 180 | autodocifier.pl [OPTION]... [FILE]... |
181 | |||
182 | Example: | ||
183 | |||
184 | ( cat docs/busybox_header.pod; \ | ||
185 | docs/autodocifier.pl usage.h; \ | ||
186 | cat docs/busybox_footer.pod ) > docs/busybox.pod | ||
180 | 187 | ||
181 | =head1 DESCRIPTION | 188 | =head1 DESCRIPTION |
182 | 189 | ||
@@ -186,7 +193,8 @@ Currently, the same content has to be duplicated in 3 places in | |||
186 | slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and | 193 | slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and |
187 | F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue. | 194 | F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue. |
188 | 195 | ||
189 | This script was based on a script by Erik Andersen (andersen@lineo.com). | 196 | This script was based on a script by Erik Andersen <andersen@lineo.com> |
197 | which was in turn based on a script by Mark Whitley <markw@lineo.com> | ||
190 | 198 | ||
191 | =head1 OPTIONS | 199 | =head1 OPTIONS |
192 | 200 | ||
@@ -219,7 +227,7 @@ The following is an example of some data this script might parse. | |||
219 | #define length_full_usage \ | 227 | #define length_full_usage \ |
220 | "Prints out the length of the specified STRING." | 228 | "Prints out the length of the specified STRING." |
221 | #define length_example_usage \ | 229 | #define length_example_usage \ |
222 | "$ length "Hello"\n" \ | 230 | "$ length Hello\n" \ |
223 | "5\n" | 231 | "5\n" |
224 | 232 | ||
225 | Each entry is a cpp macro that defines a string. The macros are | 233 | Each entry is a cpp macro that defines a string. The macros are |
@@ -249,13 +257,14 @@ is disabled. I<REQUIRED> | |||
249 | =item B<notes> | 257 | =item B<notes> |
250 | 258 | ||
251 | This is documentation that is intended to go in the POD or SGML, but | 259 | This is documentation that is intended to go in the POD or SGML, but |
252 | not be output when a B<-h> is given to a command. To see an example | 260 | not be printed when a B<-h> is given to a command. To see an example |
253 | of notes being used, see init_notes_usage. I<OPTIONAL> | 261 | of notes being used, see init_notes_usage. I<OPTIONAL> |
254 | 262 | ||
255 | =item B<example> | 263 | =item B<example> |
256 | 264 | ||
257 | This should be an example of how the command is acutally used. | 265 | This should be an example of how the command is acutally used. |
258 | I<OPTIONAL> | 266 | This will not be printed when a B<-h> is given to a command -- it |
267 | is inteded only for the POD or SGML documentation. I<OPTIONAL> | ||
259 | 268 | ||
260 | =back | 269 | =back |
261 | 270 | ||
@@ -275,4 +284,4 @@ John BEPPU <beppu@lineo.com> | |||
275 | 284 | ||
276 | =cut | 285 | =cut |
277 | 286 | ||
278 | # $Id: autodocifier.pl,v 1.20 2001/04/10 00:00:05 kraai Exp $ | 287 | # $Id: autodocifier.pl,v 1.21 2001/04/17 17:09:34 beppu Exp $ |