This is a demonstration project using help_to_man.

USAGE
-----

To use it:

0. Ensure your program emits help text with -h.  (stdout or stderr is fine)

1. Copy the help_to_man script into your man/ directory, and re-name it  
	your_program.X.sh	  where X is the manpage section you want (usually 1).
   [It's sufficiently short to be copied in its entirety every time.]

2. Edit it. Set the following:

	NAME			Your program's name
	BINARY			The binary path in the source tree (once built, it is called with -h)
	SYNOPSIS		A few words to summarise
	SECTION			The section to place it in. Usually 1. See "man man" for a list.
	SOURCE			The group of commands in which this belongs, if appropriate.
	DATE			Documentation date.
	SEE_ALSO		A list of other man pages, in the form:   "manpageA (1)"  "manpageB (1)"
	LEADING_SPACE		Prevent re-wrapping of the output of -h, if desired.
	LICENSE			License
	AUTHOR			Author/email.

3. In the makefile, run:
	bash man/your_program.X.sh	#Must be bash, not sh.

4. This generates the files:
	man/your_program.X.bz2		#Preview with man.
	man/your_program.X.html		#Preview with links

5. Installation:
	manpages go in /usr/local/share/man/manX/

6. The html version is something of an afterthought, but may also be of use.  



TRICKS
------

When documenting a file-format, the Makefile has probably already installed the documentation elsewhere.
(usually /usr/local/share/doc/APPLICATION/format-description.txt)

However, a basic man-page should exist (usually for section 5).

1. copy help_to_man.sh as format_description.5.sh

2. Set the value of BINARY to the following:
	BINARY="fudge.sh See: /usr/local/share/doc/APPLICATION/format_description.txt"

3. Create a script called fudge.sh in the same directory:
	#!/bin/sh
	echo ${@%-h}

4. The result is a man-page with all the usual sections, but whose description just reads
	"See: /usr/local/share/doc/APPLICATION/format_description.txt"



WWW
---

Make www builds the release for the web, i.e. this documentation and a tarball.
