home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / text / 1515 < prev    next >
Encoding:
Text File  |  1993-01-02  |  3.1 KB  |  92 lines

  1. Newsgroups: comp.text
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!spool.mu.edu!umn.edu!csus.edu!netcom.com!ead
  3. From: Eric De Mund <ead@netcom.com>
  4. Subject: Re: Easy way to create unix man pages?
  5. Message-ID: <1993Jan2.223434.24998@netcom.com>
  6. X-Reply-To: Eric De Mund <ead@netcom.com>
  7. Sender: ead@netcom.com (Eric De Mund)
  8. Reply-To: Eric De Mund <ead@netcom.com>
  9. Organization: Netcom Online Communication Services
  10. Date: Sat, 2 Jan 1993 22:34:34 GMT
  11. Lines: 79
  12.  
  13. | wcl@oakhill.sps.mot.com (Wayne Long) writes:
  14. | I'm looking for a filter, utility, or editor that
  15. | will take normal, what-you-see-is-what-you get
  16. | text, and convert it into a unix man page with
  17. | minimal hassle.
  18.  
  19. wayne,
  20.  
  21. probably the easiest way to make man pages is with a template. at the
  22. end of this message is one that i use.
  23.  
  24. alternatively, wrapman(1) is a perl(1) script that generates man pages
  25. from perl(1) scripts. it appears in chapter 6 of the camel book, and
  26. source is available via anon ftp in ftp.uu.net:/published/oreilly/\
  27. nutshell/perl/perl.tar.Z. you may be able to get ideas from it.
  28.  
  29. finally, there's c2man(1), available via anon ftp from keos.helsinki.fi:\
  30. /pub/archives/alt.sources/c2man (and probably other alt.sources archive
  31. sites), which generates man pages from c code.
  32.  
  33. eric de mund <ead@netcom.com>
  34.  
  35. | From the keyboard of jik@athena.mit.edu (Jonathan I. Kamens):
  36. | :My system also has a file /usr/man/man0/xx which contains
  37. | :the skeleton of a man page.
  38. | Here's such a skeleton I once wrote.
  39. | --tom <tchrist@convex.com>
  40. | .TH NAME SECTION 
  41. | .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
  42. | .\" other parms are allowed: see man(7), man(1)
  43. | .SH NAME
  44. | foo, bar \- programs to do something
  45. | .SH SYNOPSIS
  46. | a short usage summary
  47. | .SH "DESCRIPTION"
  48. | long drawn out discussion of the program.  it's a good idea
  49. | to break this up into subsections using the .SS macros, like
  50. | these:
  51. | .SS "A Sample Subection"
  52. | .SS "Yet Another Sample Subection"
  53. | .SH OPTIONS
  54. | Some people make this separate from the description.
  55. | .SH "RETURN VALUE"
  56. | What the program or function returns if successful.
  57. | .SH ERRORS
  58. | Return codes, either exit status or errno settings.
  59. | .SH EXAMPLES
  60. | give some example uses of the program
  61. | .SH ENVIRONMENT
  62. | envariables this program might care about
  63. | .SH FILES
  64. | all files used by the program.  typical usage is like this:
  65. | .br
  66. | .nf
  67. | .\" set tabstop to longest possible filename, plus a wee bit
  68. | .ta \w'/usr/lib/perl/getopts.pl   'u
  69. | \fI/usr/man\fR  default man tree
  70. | \fI/usr/man/man*/*.*\fR unformatted (nroff source) man pages
  71. | .SH "SEE ALSO"
  72. | .\" Always quote multiple words for .SH, just in case
  73. | other man pages to check out, like man(1), man(7), makewhatis(8), catman(8)
  74. | .SH NOTES
  75. | miscellaneous commentary
  76. | .SH CAVEATS
  77. | things to take special care with.  sometimes called WARNINGS.
  78. | .SH DIAGNOSTICS
  79. | all the possible error messages the program can print out, and
  80. | what they mean.
  81. | .SH BUGS
  82. | things that are broken or just don't work quite right.
  83. | .SH RESTRICTIONS
  84. | bugs you don't plan to fix :-)
  85. | .SH AUTHOR
  86. | who wrote it (or AUTHORS if multiple)
  87. | .SH HISTORY
  88. | programs derived from other sources sometimes have this.
  89.