Article View: comp.text
Article #2888Re: Easy way to create unix man pages?
From: Eric De Mund
Date: Sat, 02 Jan 1993 22:34
Date: Sat, 02 Jan 1993 22:34
79 lines
3303 bytes
3303 bytes
| wcl@oakhill.sps.mot.com (Wayne Long) writes: | I'm looking for a filter, utility, or editor that | will take normal, what-you-see-is-what-you get | text, and convert it into a unix man page with | minimal hassle. wayne, probably the easiest way to make man pages is with a template. at the end of this message is one that i use. alternatively, wrapman(1) is a perl(1) script that generates man pages from perl(1) scripts. it appears in chapter 6 of the camel book, and source is available via anon ftp in ftp.uu.net:/published/oreilly/\ nutshell/perl/perl.tar.Z. you may be able to get ideas from it. finally, there's c2man(1), available via anon ftp from keos.helsinki.fi:\ /pub/archives/alt.sources/c2man (and probably other alt.sources archive sites), which generates man pages from c code. eric de mund <ead@netcom.com> | From the keyboard of jik@athena.mit.edu (Jonathan I. Kamens): | :My system also has a file /usr/man/man0/xx which contains | :the skeleton of a man page. | | Here's such a skeleton I once wrote. | | --tom <tchrist@convex.com> | | .TH NAME SECTION | .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection | .\" other parms are allowed: see man(7), man(1) | .SH NAME | foo, bar \- programs to do something | .SH SYNOPSIS | a short usage summary | .SH "DESCRIPTION" | long drawn out discussion of the program. it's a good idea | to break this up into subsections using the .SS macros, like | these: | .SS "A Sample Subection" | .SS "Yet Another Sample Subection" | .SH OPTIONS | Some people make this separate from the description. | .SH "RETURN VALUE" | What the program or function returns if successful. | .SH ERRORS | Return codes, either exit status or errno settings. | .SH EXAMPLES | give some example uses of the program | .SH ENVIRONMENT | envariables this program might care about | .SH FILES | all files used by the program. typical usage is like this: | .br | .nf | .\" set tabstop to longest possible filename, plus a wee bit | .ta \w'/usr/lib/perl/getopts.pl 'u | \fI/usr/man\fR default man tree | \fI/usr/man/man*/*.*\fR unformatted (nroff source) man pages | .SH "SEE ALSO" | .\" Always quote multiple words for .SH, just in case | other man pages to check out, like man(1), man(7), makewhatis(8), catman(8) | .SH NOTES | miscellaneous commentary | .SH CAVEATS | things to take special care with. sometimes called WARNINGS. | .SH DIAGNOSTICS | all the possible error messages the program can print out, and | what they mean. | .SH BUGS | things that are broken or just don't work quite right. | .SH RESTRICTIONS | bugs you don't plan to fix :-) | .SH AUTHOR | who wrote it (or AUTHORS if multiple) | .SH HISTORY | programs derived from other sources sometimes have this.
Technical Details
Message-ID:
<1993Jan2.223434.24998@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!usenet.ins.cwru.edu!agate!spool.mu.edu!umn.edu!csus.edu!netcom.com!eadShow Full Headers
Complete Article Headers
Newsgroups: comp.text Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!usenet.ins.cwru.edu!agate!spool.mu.edu!umn.edu!csus.edu!netcom.com!ead From: Eric De Mund <ead@netcom.com> Subject: Re: Easy way to create unix man pages? Message-ID: <1993Jan2.223434.24998@netcom.com> X-Reply-To: Eric De Mund <ead@netcom.com> Sender: ead@netcom.com (Eric De Mund) Reply-To: Eric De Mund <ead@netcom.com> Organization: Netcom Online Communication Services Date: Sat, 2 Jan 1993 22:34:34 GMT Lines: 79