manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

Ben Finney ben+python at benfinney.id.au
Fri Apr 29 22:25:21 EDT 2016


"Martin A. Brown" <martin at linux-ip.net> writes:

> Hello [Steven D'Aprano],
>
> >What is a good place where I can find out more about writing manpage?

Writing them directly in GNU troff markup is easy enough
<URL:http://liw.fi/manpages/>.

For writing manual pages programmatically via Python code, I am working
on a ‘manpage’ library. It is not yet at PyPI, but Steven may find
the existing library <URL:https://notabug.org/bignose/python-manpage>
useful. It's free software under the GNU GPL v3 or later.

Steven, if you want to use that library for making manual pages, I'd
love to get feedback. Currently it works on an ArgumentParser instance
(to get the program's name and option help), and a Distutils
distribution (to get the boader metadata about the package).

What ‘manpage’ doesn't yet have is a more generic way to specify the
metadata of a manual page. Everything is done by directly modifying a
Document instance. I have yet to decide a data format for the data which
specifies a manual page.

Getting several more code bases using this library would make it clearer
what use cases are important, and thereby inform a data format for the
specification. Please experiment!

-- 
 \      “The process by which banks create money is so simple that the |
  `\     mind is repelled.” —John Kenneth Galbraith, _Money: Whence It |
_o__)                                       Came, Where It Went_, 1975 |
Ben Finney




More information about the Python-list mailing list