Convert argparse based executable scripts to markdown documents.
Project description
argmark
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
Project details
Release history Release notifications | RSS feed
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.3.tar.gz
(4.0 kB
view details)
Built Distribution
argmark-0.3-py3-none-any.whl
(5.0 kB
view details)
File details
Details for the file argmark-0.3.tar.gz
.
File metadata
- Download URL: argmark-0.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f7f32914c856a014feabcb713d64bf49cb7a5af6e086c33846ba2ce74ca525f |
|
MD5 | e1ee79d150dfa6de8a0031fab0c0366c |
|
BLAKE2b-256 | 2df726402adb70c56f8c4035d927a4030f33d728c655b7cd0543f6362dd28565 |
File details
Details for the file argmark-0.3-py3-none-any.whl
.
File metadata
- Download URL: argmark-0.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a86b77ba86a675f1f200094af9921d8e7c6c4916675711f7d9e65bf0bd694b5 |
|
MD5 | e628d2b3780eefe0ff7443c0a28c3cf0 |
|
BLAKE2b-256 | 85603dc23aaf7685fcd60962e2598c3bf44384ecfb1c6da11f445b4c9b9d321e |