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 CI

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.2.tar.gz (178.3 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.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_rich_argparse-0.1.2.tar.gz
  • Upload date:
  • Size: 178.3 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.2.tar.gz
Algorithm Hash digest
SHA256 d4c00e77ae02e7eaf167fd55820a914e0f0639b4e8e40301182b2534ad3bd11c
MD5 9e0cb9de0051b3f918c26718003d4f62
BLAKE2b-256 81fa8e110b5d544150690df3e095e1cc7f5217bd6f74b8a8152ac87eebb01038

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rich_argparse-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_rich_argparse-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f87bffd9577638d0e0ffdc537b062d84f799b03c2336b5b60b7d0c9bc064faed
MD5 b7386bae7ab7ec4b6333e29393b4b4b1
BLAKE2b-256 62f18682961a9cd2f18e6c79ee7bb1f6d9272641f67200c7bf8495ea1ca71637

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rich_argparse-0.1.2-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