Skip to main content

Convert argparse based executable scripts to markdown documents.

Project description

argmark

GitHub issues GitHub forks GitHub stars GitHub LICENSE PyPI - Python Version PyPI Code style: black

FOSSA Status

codecov

Convert argparse based executable scripts to markdown documents. It is based on argdown but has a simpler interface and a cleaner code.

Installation

pip install argmark

Usage

Using argmark is very simple. For a sample python file sample_argparse.py:

import argparse

parser = argparse.ArgumentParser(
    prog="sample_argparse.py",
    description="Just a test",
    formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
    "-f", "--files", help="Files to read.", required=True, nargs="+",
)
values = parser.parse_args()

Run argmark -f sample_argparse.py and it would generate:

    sample_argparse.py
    ==================

    # Description


    Just a test
    # Usage:


    ```bash
    usage: sample_argparse.py [-h] -f FILES [FILES ...]

    ```
        # Arguments

    |short|long|default|help|
    | :---: | :---: | :---: | :---: |
    |`-h`|`--help`||show this help message and exit|
    |`-f`|`--files`|`None`|Files to read.|

License

FOSSA Status

Project details


Download files

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

Files for argmark, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size argmark-0.3-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size argmark-0.3.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page