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.1.0.tar.gz (21.1 kB view hashes)

Uploaded Source

Built Distributions

shellman-0.1.0-py3.5.egg (27.6 kB view hashes)

Uploaded Source

shellman-0.1.0-py2.py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 2 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