Skip to content

sean2077/auto-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A python tool for auto-generating usage for python cli tools.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published