help2man
Convert --help and --version to man page.
Similar Projects
- GNU help2man Generate manpage for
any program with
--helpand--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
--helpand--version. Written in python. - This project: Generate manpage, markdown or any format (if you provide
a jinja template) for
any program with
--helpand--versionor any argparse-based python program.
Intention
This a python version of GNU help2man. It solves the following problems1:
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.
-
I send email to the author of
GNU help2manbut got no response. ↩
Metadata
Release files for help2man 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| help2man-0.0.9.tar.gz | 36.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| help2man-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.7 kB
Release files / help2man-0.0.9.tar.gz
| Download URL | help2man-0.0.9.tar.gz |
|---|---|
| Size | 36.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57fa18ed59ee94952a2341153eae34fc90020cb4ebb26ce8a7324334119cf81a
|
|
BLAKE2b-256 checksum How to use checksums |
f44183be1788195c2aa555060ea3a06c91e6ed411452beee3fd9e20e07a2e96e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / help2man-0.0.9-py3-none-any.whl
| Download URL | help2man-0.0.9-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36f6ec6c8a0130f85c36bd1e5dd2af34f8e60a46e5d4a271f769c9aaab6c6a1d
|
|
BLAKE2b-256 checksum How to use checksums |
4dd58c6fe57086a8cae02067391b51bfd8329a65446cfc5324da8f22d1d90bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|