Skip to main content

Convert argparse based executable scripts to markdown documents.

Project description

argmark

GitHub issues GitHub forks GitHub stars GitHub LICENSE codecov

Convert argparse based executable scripts to markdown documents. It is based upon argdown but has a simpler interfaceand 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.|

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

argmark-0.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distributions

argmark-0.1-py3.6.egg (6.5 kB view hashes)

Uploaded Source

argmark-0.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

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