Name | help2man JSON |
Version |
0.0.9
JSON |
| download |
home_page | |
Summary | Convert --help and --version to man page. |
upload_time | 2023-04-11 17:10:17 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | GPL v3 |
keywords |
help2man
man
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# help2man
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Freed-Wu/help2man/main.svg)](https://results.pre-commit.ci/latest/github/Freed-Wu/help2man/main)
[![github/workflow](https://github.com/Freed-Wu/help2man/actions/workflows/main.yml/badge.svg)](https://github.com/Freed-Wu/help2man/actions)
[![codecov](https://codecov.io/gh/Freed-Wu/help2man/branch/main/graph/badge.svg)](https://codecov.io/gh/Freed-Wu/help2man)
[![readthedocs](https://shields.io/readthedocs/help2man)](https://help2man.readthedocs.io)
[![github/downloads](https://shields.io/github/downloads/Freed-Wu/help2man/total)](https://github.com/Freed-Wu/help2man/releases)
[![github/downloads/latest](https://shields.io/github/downloads/Freed-Wu/help2man/latest/total)](https://github.com/Freed-Wu/help2man/releases/latest)
[![github/issues](https://shields.io/github/issues/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/issues)
[![github/issues-closed](https://shields.io/github/issues-closed/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/issues?q=is%3Aissue+is%3Aclosed)
[![github/issues-pr](https://shields.io/github/issues-pr/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/pulls)
[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/pulls?q=is%3Apr+is%3Aclosed)
[![github/discussions](https://shields.io/github/discussions/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/discussions)
[![github/milestones](https://shields.io/github/milestones/all/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/milestones)
[![github/forks](https://shields.io/github/forks/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/network/members)
[![github/stars](https://shields.io/github/stars/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/stargazers)
[![github/watchers](https://shields.io/github/watchers/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/watchers)
[![github/contributors](https://shields.io/github/contributors/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/graphs/contributors)
[![github/commit-activity](https://shields.io/github/commit-activity/w/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/graphs/commit-activity)
[![github/last-commit](https://shields.io/github/last-commit/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/commits)
[![github/release-date](https://shields.io/github/release-date/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/releases/latest)
[![github/license](https://shields.io/github/license/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/blob/main/LICENSE)
[![github/languages](https://shields.io/github/languages/count/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![github/languages/top](https://shields.io/github/languages/top/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![github/directory-file-count](https://shields.io/github/directory-file-count/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![github/code-size](https://shields.io/github/languages/code-size/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![github/repo-size](https://shields.io/github/repo-size/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![github/v](https://shields.io/github/v/release/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)
[![pypi/status](https://shields.io/pypi/status/help2man)](https://pypi.org/project/help2man/#description)
[![pypi/v](https://shields.io/pypi/v/help2man)](https://pypi.org/project/help2man/#history)
[![pypi/downloads](https://shields.io/pypi/dd/help2man)](https://pypi.org/project/help2man/#files)
[![pypi/format](https://shields.io/pypi/format/help2man)](https://pypi.org/project/help2man/#files)
[![pypi/implementation](https://shields.io/pypi/implementation/help2man)](https://pypi.org/project/help2man/#files)
[![pypi/pyversions](https://shields.io/pypi/pyversions/help2man)](https://pypi.org/project/help2man/#files)
Convert `--help` and `--version` to man page.
## Similar Projects
- [GNU help2man](https://www.gnu.org/software/help2man) Generate manpage for
any program with `--help` and `--version`. Written in perl.
- [click-man](https://github.com/click-contrib/click-man) Generate manpage for
click-based python program. Written in python.
- [cli2man](https://github.com/tobimensch/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](https://docs.jinkan.org/docs/jinja2/templates.html) template) for
any program with `--help` and `--version` or any argparse-based python
program.
## Intention
This a python version of [GNU help2man](https://www.gnu.org/software/help2man). It
solves the following problems[^email]:
### `GNU help2man` cannot convert `argparse` correctly
Because [argparse](https://docs.python.org/3/library/argparse.html) outputs:
```text
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](http://docs.jinkan.org/docs/jinja2/templates.html). See
[template](https://github.com/Freed-Wu/help2man/tree/main/src/help2man/assets/jinja2)
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](https://pypi.org/project/setuptools-generate):
See [document](https://help2man.readthedocs.io) to know more.
[^email]: I send email to the author of `GNU help2man` but got no response.
Raw data
{
"_id": null,
"home_page": "",
"name": "help2man",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "help2man,man",
"author": "",
"author_email": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"download_url": "https://files.pythonhosted.org/packages/f4/41/83be1788195c2aa555060ea3a06c91e6ed411452beee3fd9e20e07a2e96e/help2man-0.0.9.tar.gz",
"platform": null,
"description": "# help2man\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Freed-Wu/help2man/main.svg)](https://results.pre-commit.ci/latest/github/Freed-Wu/help2man/main)\n[![github/workflow](https://github.com/Freed-Wu/help2man/actions/workflows/main.yml/badge.svg)](https://github.com/Freed-Wu/help2man/actions)\n[![codecov](https://codecov.io/gh/Freed-Wu/help2man/branch/main/graph/badge.svg)](https://codecov.io/gh/Freed-Wu/help2man)\n[![readthedocs](https://shields.io/readthedocs/help2man)](https://help2man.readthedocs.io)\n\n[![github/downloads](https://shields.io/github/downloads/Freed-Wu/help2man/total)](https://github.com/Freed-Wu/help2man/releases)\n[![github/downloads/latest](https://shields.io/github/downloads/Freed-Wu/help2man/latest/total)](https://github.com/Freed-Wu/help2man/releases/latest)\n[![github/issues](https://shields.io/github/issues/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/issues)\n[![github/issues-closed](https://shields.io/github/issues-closed/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/issues?q=is%3Aissue+is%3Aclosed)\n[![github/issues-pr](https://shields.io/github/issues-pr/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/pulls)\n[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/pulls?q=is%3Apr+is%3Aclosed)\n[![github/discussions](https://shields.io/github/discussions/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/discussions)\n[![github/milestones](https://shields.io/github/milestones/all/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/milestones)\n[![github/forks](https://shields.io/github/forks/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/network/members)\n[![github/stars](https://shields.io/github/stars/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/stargazers)\n[![github/watchers](https://shields.io/github/watchers/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/watchers)\n[![github/contributors](https://shields.io/github/contributors/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/graphs/contributors)\n[![github/commit-activity](https://shields.io/github/commit-activity/w/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/graphs/commit-activity)\n[![github/last-commit](https://shields.io/github/last-commit/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/commits)\n[![github/release-date](https://shields.io/github/release-date/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/releases/latest)\n\n[![github/license](https://shields.io/github/license/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man/blob/main/LICENSE)\n[![github/languages](https://shields.io/github/languages/count/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n[![github/languages/top](https://shields.io/github/languages/top/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n[![github/directory-file-count](https://shields.io/github/directory-file-count/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n[![github/code-size](https://shields.io/github/languages/code-size/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n[![github/repo-size](https://shields.io/github/repo-size/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n[![github/v](https://shields.io/github/v/release/Freed-Wu/help2man)](https://github.com/Freed-Wu/help2man)\n\n[![pypi/status](https://shields.io/pypi/status/help2man)](https://pypi.org/project/help2man/#description)\n[![pypi/v](https://shields.io/pypi/v/help2man)](https://pypi.org/project/help2man/#history)\n[![pypi/downloads](https://shields.io/pypi/dd/help2man)](https://pypi.org/project/help2man/#files)\n[![pypi/format](https://shields.io/pypi/format/help2man)](https://pypi.org/project/help2man/#files)\n[![pypi/implementation](https://shields.io/pypi/implementation/help2man)](https://pypi.org/project/help2man/#files)\n[![pypi/pyversions](https://shields.io/pypi/pyversions/help2man)](https://pypi.org/project/help2man/#files)\n\nConvert `--help` and `--version` to man page.\n\n## Similar Projects\n\n- [GNU help2man](https://www.gnu.org/software/help2man) Generate manpage for\n any program with `--help` and `--version`. Written in perl.\n- [click-man](https://github.com/click-contrib/click-man) Generate manpage for\n click-based python program. Written in python.\n- [cli2man](https://github.com/tobimensch/cli2man) Generate manpage and\n markdown for any program with `--help` and `--version`. Written in python.\n- This project: Generate manpage, markdown or any format (if you provide\n a [jinja](https://docs.jinkan.org/docs/jinja2/templates.html) template) for\n any program with `--help` and `--version` or any argparse-based python\n program.\n\n## Intention\n\nThis a python version of [GNU help2man](https://www.gnu.org/software/help2man). It\nsolves the following problems[^email]:\n\n### `GNU help2man` cannot convert `argparse` correctly\n\nBecause [argparse](https://docs.python.org/3/library/argparse.html) outputs:\n\n```text\nusage: help2man [-h] ...\n executable ...\n\nConvert --help and --version to man page.\n\npositional arguments:\n executable executable program name\n ...\n\noptions:\n -h show this help message and exit\n ...\n```\n\n`help2man` will ignore `positional arguments:` and `options:` because it only\ndetect `Options:`. And it only detect first line as synopsis and detect other\nlines as description incorrectly.\n\n### `GNU help2man` cannot customize template\n\nI provide `help2man --template XXX` and `help2man --template-file XXX` to do\nit. The template language is\n[jinja2](http://docs.jinkan.org/docs/jinja2/templates.html). See\n[template](https://github.com/Freed-Wu/help2man/tree/main/src/help2man/assets/jinja2)\nas examples.\n\n### GNU help2man don't provide any programming API\n\nNow you can use it in python. If you want to generate man pages automatically\nwhen you build a python project, you can see\n[setuptools-generate](https://pypi.org/project/setuptools-generate):\n\nSee [document](https://help2man.readthedocs.io) to know more.\n\n[^email]: I send email to the author of `GNU help2man` but got no response.\n",
"bugtrack_url": null,
"license": "GPL v3",
"summary": "Convert --help and --version to man page.",
"version": "0.0.9",
"split_keywords": [
"help2man",
"man"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4dd58c6fe57086a8cae02067391b51bfd8329a65446cfc5324da8f22d1d90bf1",
"md5": "8126336fc9420410084373b3d3f81b7a",
"sha256": "36f6ec6c8a0130f85c36bd1e5dd2af34f8e60a46e5d4a271f769c9aaab6c6a1d"
},
"downloads": -1,
"filename": "help2man-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8126336fc9420410084373b3d3f81b7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 28721,
"upload_time": "2023-04-11T17:09:59",
"upload_time_iso_8601": "2023-04-11T17:09:59.368180Z",
"url": "https://files.pythonhosted.org/packages/4d/d5/8c6fe57086a8cae02067391b51bfd8329a65446cfc5324da8f22d1d90bf1/help2man-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f44183be1788195c2aa555060ea3a06c91e6ed411452beee3fd9e20e07a2e96e",
"md5": "c7a8676c809a209f9e91079c1e3565a7",
"sha256": "57fa18ed59ee94952a2341153eae34fc90020cb4ebb26ce8a7324334119cf81a"
},
"downloads": -1,
"filename": "help2man-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "c7a8676c809a209f9e91079c1e3565a7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 36017,
"upload_time": "2023-04-11T17:10:17",
"upload_time_iso_8601": "2023-04-11T17:10:17.508766Z",
"url": "https://files.pythonhosted.org/packages/f4/41/83be1788195c2aa555060ea3a06c91e6ed411452beee3fd9e20e07a2e96e/help2man-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-11 17:10:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "help2man"
}