Generate well-formatted man-pages from the output of -h
Many projects suffer from poor, missing, or out-of-date man pages. These tend to get out-of-sync with the main release, especially because they are tricky to write (the GROFF language isn't exactly familiar to most programmers, even with the asssistance of utilities such as manedit.
I think the most natural place for documentation is inside the program itself (invocation with "-h"), because it keeps the documentation and code together - this makes it much
easier to keep them in sync, and to ensure the documentation is written at all. Furthermore, it allows the documentation to be more accurate: the output of "-h" can include information
known to the program, such as #defined constants from the header file, or specific build-time details; these can't usually be dynamically inserted into man pages.
Thus, help_to_man, a system designed for the maximum simplicity of integration and ease of use. It takes only a couple of minutes to add to your project, and it emits correct, standard man-pages. It also builds html man pages. Full details are in the README.txt, and there is an example project with makefile included herein.
Alternatives: there is already a program help2man but that is actually more complicated to use, and doesn't always get the output correct. Notably, it doesn't always escape text correctly from groff, it tends to create double-spaced text (blank-lines between every line), and it always re-wraps the output of -h, even when you may wish to prevent this. Furthermore, it's more complicated to use and less flexible. Also, man2html alone is designed to work as part of a CGI-script. so it adds unwanted headers; we remove them, set the font to fixed-width, and add spamblocks to any embedded email addresses.
This was originally written as part of my PhD Infrared Camera system. It should be possible to adapt it for much wider usage.