Skip to main content

Write doc in your shell scripts.

Project description

Shellman

Write doc in your shell scripts.

Shellman is a Python package that read files, search for special comment lines (documentation) and output formatted documentation as text, markdown or man page.

License

Software licensed under MPL 2.0 license.

Installation

pip install [--user] shellman

Documentation

https://github.com/Pawamoy/shellman/wiki

Development

To run all the tests: tox

Usage

To render the doc on stdout:

shellman FILE
# equivalent to...
shellman --format=text FILE
# other available formats:
shellman --format=man FILE
shellman --format=markdown FILE

You can pass the -o, --output option to specify a file to write to, instead of stdout.

To check if the documentation within a script is correct:

shellman --check --warn FILE         # CI test
shellman --check --failfast FILE     # quick CI test with no output
shellman --check --warn --nice FILE  # always passing test with output

In a script, for automatic help text:

#!/bin/bash

## \brief Just a demo
## \desc This script actually does nothing.

main() {
  case "$1" in
    ## \option -h, --help
    ## Print this help and exit.
    -h|--help) shellman "$0"; exit 0 ;;
  esac
}

## \usage demo [-h]
main "$@"

Output when calling ./demo -h:

Usage: demo [-h]

This script actually does nothing.

Options:
  -h, --help
    Print this help and exit.

Changelog

0.1.0 (2016-11-30)

  • Alpha release on PyPI.

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

shellman-0.2.1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

shellman-0.2.1-py2.py3-none-any.whl (17.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file shellman-0.2.1.tar.gz.

File metadata

  • Download URL: shellman-0.2.1.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shellman-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e3abe9f9e1c614d42ad4384bf9eadd93a497043fbf443555931059f4cf1d13e1
MD5 d8f3453a4343f8219249540d85f08be0
BLAKE2b-256 2c5075a47cefe8cbb554a397ff26f1905304824d0a8c6c1e5be8dd9d41e81f96

See more details on using hashes here.

File details

Details for the file shellman-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for shellman-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 47d8fed5aa36a19df846af9046496c94a875c257f8be8e1a09da831db42551a3
MD5 78b6072878b4abefcfc3629de6ce6af5
BLAKE2b-256 0e4eb9c3b62b37db85ed80a01093d19e6d7e0c4d6e4b3390caa8721026a305df

See more details on using hashes here.

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