Skip to main content

Write documentation in comments and render it with templates.

Project description

Shell Script Documentation

Write documentation in comments and render it with templates.

ci documentation pypi gitpod gitter

shellman can generate man pages, wiki pages and help text using documentation written in shell scripts comments.

For example:

#!/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.

You can see more examples in the documentation: https://pawamoy.github.io/shellman/.

Demo

In the demo above we saw the three builtin templates: helptext, manpage and wikipage.

You can use your own templates by specifying them with the --template path:my/template syntax.

You can also write a plugin, see the docs: https://pawamoy.github.io/shellman/plugins.

Installation

With pip:

pip install shellman

With pipx:

python3.8 -m pip install --user pipx
pipx install shellman

Some projects using shellman

  • shellm — A collection of scripts and libraries built on a core inclusion-system, all installable with basher. Here are a few examples:
    • daemon — A library that facilitates the writing of daemonized scripts that consume files in a watched directory.
    • debug — A simple script that sets the verbose/dry-run/debug Bash flags before running another script.
    • format — Format your output with style and color.
    • home — A home for your shell scripts!
    • loop — Control the flow of your loops (pause/resume/etc.).

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-1.0.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

shellman-1.0.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shellman-1.0.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for shellman-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b49c8e50d4df9c1b84ccadaa5164dd62a139619d2bfc93a03d4f6d9035eb04c
MD5 e2739883563b01f1710eeffe19f4080d
BLAKE2b-256 a049b7c942217081120692856c5917f9ba955e8a8f01358fc2d63952ad541508

See more details on using hashes here.

File details

Details for the file shellman-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: shellman-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for shellman-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02647e5146195f8a50f3687720ba4c990ad8666e38d833eba160ab57cabec116
MD5 39f2a0052993fd62e7b95166b76efe9c
BLAKE2b-256 5b6f9eda5b059ffeb503562af9747a7ecbcb412bb48b97ce013f5b6095d0c60d

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