Skip to main content

An MkDocs plugin to generate documentation for a rich argparse parser

Project description

Mkdocs rich argparse

github repo badge github license badge RSD workflow pypi badge fair-software badge build

An MkDocs plugin to generate documentation for a rich argparse parser. It renders commands, sub commands and sub-sub commands which can have rich help messages.

Installation

Install from Pypi:

pip install mkdocs_rich_argparse

Usage

In your mkdocs.yml configuration file, add the plugin and configure it with the module and factory to document:

plugins:
    - mkdocs_rich_argparse:
        module: my_module
        factory: my_factory_function

nav:
   - CLI Reference: cli.md

Where my_module is the Python module containing your argparse parser factory function, and my_factory_function is the specific function that returns an argparse parser object. It should be callable without arguments. You can optionally add path to specify the path to the module if it's not in the Python path.

When serving or building your MkDocs site, the plugin will generate a cli.md file containing the documentation for the specified argparse parser.

See the example/ directory for a minimal example and a custom styled example.

Screenshot of example

Contributing

If you want to contribute to the development of mkdocs_rich_argparse, have a look at the contribution guidelines.

Project details


Download files

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

Source Distribution

mkdocs_rich_argparse-0.1.1.tar.gz (178.4 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_rich_argparse-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_rich_argparse-0.1.1.tar.gz.

File metadata

  • Download URL: mkdocs_rich_argparse-0.1.1.tar.gz
  • Upload date:
  • Size: 178.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_rich_argparse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68a90623b57d407d057fd3023074c79e310041bd3e6e36958ad9c7726a1b9cf4
MD5 045d64e1bcc7e93491da45182bb8a8e0
BLAKE2b-256 fe6992b19ea064a48057bec1c456be9c8d363172cc9451005774682099a075e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rich_argparse-0.1.1.tar.gz:

Publisher: pypi-publish.yml on i-VRESSE/mkdocs_rich_argparse

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

File details

Details for the file mkdocs_rich_argparse-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_rich_argparse-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad4a26089413c1ad46609b109a15cc69184142cabe1d36e205825c3fb7f25770
MD5 d4da80eb83a83c6226da7bc740007dc8
BLAKE2b-256 b3c87c916d0341d30391dc8959cdf32feb722f4cc407df08ed777804e49a4d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rich_argparse-0.1.1-py3-none-any.whl:

Publisher: pypi-publish.yml on i-VRESSE/mkdocs_rich_argparse

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