A python tool for agenerating or auto-updating usage of python cli tools.
Project description
Auto Usage
A python tool for auto-generating or auto-updating usage of python cli tools.
Note: This project was created with Cookiecutter and the
zhangxianbing/cookiecutter-pypackage
project template.
Installation
# install
pip install auto-usage
# usage
cd /path/to/project
auto-usage
How to use
Auto-usage works for python cli tools based on argparse, click or other scripts that support '--help' option for showing help message like the following usage.
For auto-usage using regex pattern ^[uU]sage:
to search where the usage beginning, and using ^[cC]ommands:\s*$
to search where the subcommands beginning, you must make sure your tool's usage following the pattern.
As for project structure, you can refer to this project, or just created with Cookiecutter and the zhangxianbing/cookiecutter-pypackage
project template.
Usage
usage: auto-usage [-h] [-V] [-c COMMAND] <command> ...
A python tool for auto-generating or auto-updating usage of python cli tools.
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-c COMMAND, --command COMMAND
main command, default is "python -m auto_usage"
Commands:
<command>
quickstart quickstart for auto-usage.
subcommand: quickstart
usage: auto-usage quickstart [-h]
optional arguments:
-h, --help show this help message and exit
Note: This usage is auto-generated by zhangxianbing/auto-usage.
Project details
Release history Release notifications | RSS feed
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 auto_usage-1.0.1.tar.gz
.
File metadata
- Download URL: auto_usage-1.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578ead846f15a9dab3ae19942b6870122f9fbf359f328cae7eb5c309aff96ce3 |
|
MD5 | 2b5306f5460225cbb3baa481e1528633 |
|
BLAKE2b-256 | 48404c9d275743f553d6d7322530ec0a1c4e5d32487dfd2d218e0eef34751512 |
File details
Details for the file auto_usage-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: auto_usage-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c946c584e6f06c87856917df14fe459590a99686968c4d7e09cf24640fe5240 |
|
MD5 | a684177d7685c95a31bef23c135a3db3 |
|
BLAKE2b-256 | bb5c1dbb5869a3821690a3cd728fceace4cfcfb9cffce56f6dadb922d74d4d64 |