I am developing a python CLI tool (using optparse in python2.6, but hope to switch soon to python2.7) and I am about to write the man page. I have some experience on generating dynamic man pages by:
I would also like to generate wiki pages with the same content as the man page (with pod I can generate html through pod2html, and probably the html can be easily translated into wiki format). Has someone a better idea/flow on how to do this?
One thing I have found as interesting is on this link: Creating Man Pages Using optparse and distutils
The usual way to generate documentation in Python is to use Sphinx. For example, that's what's used in the official Python documentation. Once you have a Sphinx documentation project set up (see this tutorial), you can generate man pages from your Sphinx documentation files via make man
. You should also alter the configuration in conf.py
to produce appropriate output.
(It's worth noting that while Sphinx is the usual tool for writing documentation in Python, that doesn't mean it's the usual tool for generating man pages. Use what you want!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With