click-summarizer
Table of Contents
Installation
pip install click-summarizer
Usage: Command Line
click-summarizer --help
click-summarizer click_summarizer.cli summarize_cli
# Use it for other click-based cli apps.
click-summarizer dataset_sh.cli cli
click-summarizer dataset_sh.cli cli --no-doc
Usage: Python
Assuming you have a click app like this:
@click.group()
@click.option('--verbose', is_flag=True, help='Enable verbose mode.')
def my_cli(verbose):
"""Main CLI group."""
pass
@my_cli.command()
@click.option('--name', prompt='Your name', help='The person to greet.')
@click.argument('times', type=int)
def greet(name, times):
"""Greet someone a number of times."""
for _ in range(times):
click.echo(f"Hello, {name}!")
@my_cli.group()
def math():
"""Math operations."""
pass
@math.command()
@click.argument('x', type=int)
@click.argument('y', type=int)
def add(x, y):
"""Add two numbers."""
click.echo(x + y)
@math.command()
@click.argument('x', type=int)
@click.argument('y', type=int)
def subtract(x, y):
"""Subtract two numbers."""
click.echo(x - y)
from click_summarizer import summarize_click_command
out = summarize_click_command(my_cli, show_help=True, show_options=True)
print(out.getvalue())
License
click-summarizer is distributed under the terms of the MIT license.
Metadata
Release files for click-summarizer 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| click_summarizer-0.0.1.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| click_summarizer-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / click_summarizer-0.0.1.tar.gz
| Download URL | click_summarizer-0.0.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ba1959367f2194f1931c7c3dd9a4972184e234560836031c7cd8c62db5828a6
|
|
BLAKE2b-256 checksum How to use checksums |
e05aac989426e574a7c91d9580fe2401cb1e7b0af84a057cc1fff9e24f39a7a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / click_summarizer-0.0.1-py3-none-any.whl
| Download URL | click_summarizer-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63bdd13e6a32a745d6583973e1e32b086fd950a55afb5940f63c39a434ca0eda
|
|
BLAKE2b-256 checksum How to use checksums |
de8a58817e570fbf2f3f9d2b401fb74a9a46ac815b80966ad8b165da01653cb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|