Skip to main content

No project description provided

Project description

MD Click

MD-Click is a command line tool for creating .md files for any python's click CLI projects.

The Problem

After creating new CLI project using click, we couldn't found out any tool that generates automatic .md files documentation per each command. This is the reason we've create this quick and easy tool.

The Solution

MD-Click creates .md files per each command exists under the click project CLI. The tool runs recursively and generates a markdown file per each command, and sub commands.

Installation

Just install it using pip:

> pip install md-click

Usage

Create md files per each command, in format of parent-command, under the --docsPath directory.

for example, we have the next click python module:

# app/cli.py
import click

@click.group('namer')
@click.option('--debug', help='Should I run on Debug?', is_flag=True)
def main(**kwargs):
  """ A namer CLI """
  debug = kwargs.get('debug')
  if debug:
    click.secho('is Debug? True', color='green')

@main.command('full')
@click.option('--name', help='The user name', required=True, type=str)
@click.option('--lastName', help='The last Name', required=False, type=str)
def full_name(**kwargs):
    """ A CLI that gets name and last name and returns the full name"""
    firstname = kwargs.get('name')
    lastname = kwargs.get('lastname')

    click.secho(f'The full name is: {firstname} {lastname}', color='yellow')

and we want to create a nice md files per each command, we'll run the next cli command:

> mdclick dumps --baseModule=app.cli --baseCommand=main --docPath=./docs/commands

The output:

./docs/commands/namer.md
./docs/commands/namer-full.md

As you can assume, all of the markdown files under docs/commands in this repository, generated automatically by mdclick command. Use them as a reference.

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

md-click-1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distributions

md_click-1.0-py3.8.egg (9.4 kB view details)

Uploaded Egg

md_click-1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file md-click-1.0.tar.gz.

File metadata

  • Download URL: md-click-1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for md-click-1.0.tar.gz
Algorithm Hash digest
SHA256 828f9f4b4309d356d778d6340a2713844a8f7ac639a8e0ca1f8ea4db94a901eb
MD5 93c15e50f0562d13ac7f4bb2c25b9097
BLAKE2b-256 0d72ae03b0aa85c9af822e4bbd7edff19f74874083c08a3a8de0dee92a460984

See more details on using hashes here.

File details

Details for the file md_click-1.0-py3.8.egg.

File metadata

  • Download URL: md_click-1.0-py3.8.egg
  • Upload date:
  • Size: 9.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for md_click-1.0-py3.8.egg
Algorithm Hash digest
SHA256 78c904ac263b8ea03d38826259c6388d40770cedcdd6ec1a8677a88653f6c989
MD5 4f024b2cfbc7bc5aea67138eb5587373
BLAKE2b-256 a43b8f4117f5d7f70fd7d58ff3736b7601ca3ef10f668a799d5002a901b44a01

See more details on using hashes here.

File details

Details for the file md_click-1.0-py3-none-any.whl.

File metadata

  • Download URL: md_click-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for md_click-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14db66d912049c4b74cc0649325e4004d2bb0811042983691efc3165779d4f70
MD5 576ed6c7243b3d47aa472e8097ed7fa6
BLAKE2b-256 548c79b5575ac5d4e52d28f75c020f79ceed1740690e4309c324fe7b7be327aa

See more details on using hashes here.

Supported by

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