Convert --help and --version to man page.
Project description
help2man
Convert --help
and --version
to man page.
Similar Projects
- GNU help2man Generate manpage for
any program with
--help
and--version
. Written in perl. - click-man Generate manpage for click-based python program. Written in python.
- cli2man Generate manpage and
markdown for any program with
--help
and--version
. Written in python. - This project: Generate manpage, markdown or any format (if you provide
a jinja template) for
any program with
--help
and--version
or any argparse-based python program.
Intention
This a python version of GNU help2man. It solves the following problems[^email]:
GNU help2man
cannot convert argparse
correctly
Because argparse outputs:
usage: help2man [-h] ...
executable ...
Convert --help and --version to man page.
positional arguments:
executable executable program name
...
options:
-h show this help message and exit
...
help2man
will ignore positional arguments:
and options:
because it only
detect Options:
. And it only detect first line as synopsis and detect other
lines as description incorrectly.
GNU help2man
cannot customize template
I provide help2man --template XXX
and help2man --template-file XXX
to do
it. The template language is
jinja2. See
template
as examples.
GNU help2man don't provide any programming API
Now you can use it in python. If you want to generate man pages automatically when you build a python project, you can see setuptools-generate:
See document to know more.
[^email]: I send email to the author of GNU help2man
but got no response.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file help2man-0.0.9.tar.gz
.
File metadata
- Download URL: help2man-0.0.9.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57fa18ed59ee94952a2341153eae34fc90020cb4ebb26ce8a7324334119cf81a |
|
MD5 | c7a8676c809a209f9e91079c1e3565a7 |
|
BLAKE2b-256 | f44183be1788195c2aa555060ea3a06c91e6ed411452beee3fd9e20e07a2e96e |
File details
Details for the file help2man-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: help2man-0.0.9-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f6ec6c8a0130f85c36bd1e5dd2af34f8e60a46e5d4a271f769c9aaab6c6a1d |
|
MD5 | 8126336fc9420410084373b3d3f81b7a |
|
BLAKE2b-256 | 4dd58c6fe57086a8cae02067391b51bfd8329a65446cfc5324da8f22d1d90bf1 |