Convert --help and --version to man page.
Project description
help2man
Convert --help and --version to man page.
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.man
and
template.md
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 since now.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file help2man-0.0.1.tar.gz.
File metadata
- Download URL: help2man-0.0.1.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50621c35716a0e22980b76714ac331dd0aa4b306434a7286f637635190c10fcd
|
|
| MD5 |
1d7fd465ab22ab3f6ada956dbda840ee
|
|
| BLAKE2b-256 |
b30e83469b4e404fa15b0dbb0a2f6be122940f64930120a28670db3c8d36aae2
|
File details
Details for the file help2man-0.0.1-py3-none-any.whl.
File metadata
- Download URL: help2man-0.0.1-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05ef5f68d1f55be92d44cd8bbce0533e1fb00af76303a9cbf7230b838a9a8f70
|
|
| MD5 |
904a6b1b0242a12687b1a631b5d590f1
|
|
| BLAKE2b-256 |
3a23da81de3892dc6791235f088b2f4211030f1f076ddcf7123f49be9af8fb47
|