Skip to main content

Pull argparse configuration out of a CLI tool and write it as Markdown. Great for embedding in a README.md with cog.

Project description

Pull argparse configuration out of a CLI tool and write it as Markdown.

Great for embedded in a README.md with cog.

Possible invocation options:

# entrypoint command, dotted module
uv run argparse-help-markdown -m tests.data.example

# script, script
argparse_help_markdown.py script.py

# import, function, custom writer
from argparse_help_markdown import run_script
with open("out.md", mode="w") as f:
    run_script("mytool.py", include_usage=True, writer=f)
usage: cog script.py
Options Values Help
positional arguments
filename
Optional. Path to the subject script.
options
-h --help
Flag. show this help message and exit
--usage
Flag. Emit the terse usage info in triple-ticks. Excluded by default.
--write
Optional. Write to named file instead of stdout.
-m --module
Optional. Run as module.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argparse_help_markdown-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file argparse_help_markdown-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for argparse_help_markdown-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cf5f4aa66669b0a658e2b3e539bbe3be09f05f35a7c04c6e802e14703bf728a
MD5 cefa15e1bcc3dd0840c5caa231e117c5
BLAKE2b-256 f48c46b2b128e26caccd081923e459624572f4783839fb766188bf09d53ded23

See more details on using hashes here.

Provenance

The following attestation bundles were made for argparse_help_markdown-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on ellieayla/argparse-help-markdown

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page