Skip to main content

Write doc in your shell scripts.

Project description

Shellman

Write doc in your shell scripts.

Shellman is a Python script 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 shellman

Documentation

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

Development

To run all the tests: tox

Usage

shellman FILE
# equivalent to...
SHELLMAN_FORMAT=text shellman FILE
# also available:
SHELLMAN_FORMAT=man shellman FILE
SHELLMAN_FORMAT=markdown shellman FILE

The script does not currently handle arguments, except for the file name.

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.py "$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.0.tar.gz (25.9 kB view hashes)

Uploaded source

Built Distributions

shellman-0.2.0-py3.5.egg (36.2 kB view hashes)

Uploaded 3 5

shellman-0.2.0-py2.py3-none-any.whl (17.3 kB view hashes)

Uploaded py2 py3

Supported by

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