Skip to main content

Write doc in your shell scripts.

Project description

<p align="center">
<img src="logo.png">
</p>

<h1 align="center">Shell Script Documentation</h1>

<p align="center">Write documentation in comments and render it with templates.</p>

<!-- start-badges -->
<p align="center">
<a href="https://gitlab.com/pawamoy/shellman/commits/master">
<img alt="pipeline status" src="https://gitlab.com/pawamoy/shellman/badges/master/pipeline.svg" />
</a>
<a href="https://gitlab.com/pawamoy/shellman/commits/master">
<img alt="coverage report" src="https://gitlab.com/pawamoy/shellman/badges/master/coverage.svg" />
</a>
<a href="https://pypi.python.org/pypi/shellman/">
<img alt="pypi version" src="https://img.shields.io/pypi/v/shellman.svg?style=flat" />
</a>
<a href="https://pypi.python.org/pypi/shellman/">
<img alt="python wheel" src="https://img.shields.io/pypi/wheel/shellman.svg?style=flat" />
</a>
<a href="https://gitter.im/pawamoy/shellman">
<img alt="gitter chat" src="https://badges.gitter.im/pawamoy/shellman.svg" />
</a>
</p>
<!-- end-badges -->

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

For example:

```bash
#!/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 and all the documentation in the wiki!

- [GitLab wiki](https://gitlab.com/pawamoy/shellman/wikis)
- [GitHub wiki](https://github.com/pawamoy/shellman/wiki)

<h2 align="center">Demo</h2>
<p align="center"><img src="demo.svg"></p>

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 wiki page on GitLab] or [on GitHub].

[the wiki page on GitLab]: https://gitlab.com/pawamoy/shellman/wikis/plugins
[on GitHub]: https://github.com/pawamoy/shellman/wiki/plugins

## Installation
`shellman` is written in Python, so you must install it with `pip`:

pip install shellman

## Some projects using shellman

- [shellm](https://github.com/shellm-org) —
A collection of scripts and libraries
built on its [core inclusion-system](https://github.com/shellm-org/core),
all installable with [basher](https://github.com/basherpm/basher).

## License
Software licensed under [ISC] license.

[ISC]: https://www.isc.org/downloads/software-support-policy/isc-license/


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

Uploaded Source

Built Distribution

shellman-0.3.0-py2.py3-none-any.whl (21.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: shellman-0.3.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.0

File hashes

Hashes for shellman-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0e2d86f5a560f024fc075c7e9efbf1422732ae69aaca1040c224bca4c9f00c3f
MD5 9c02a135dca3c1d6b6bbcd2eec689535
BLAKE2b-256 15e77fb8848ecebeb35238286087b90b1b6c788132154550802bf39d6f435138

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shellman-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.0

File hashes

Hashes for shellman-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 97d448752c1893390566db13bbcf66f7bee05be304aa2b77766de55a61c87cdc
MD5 e6595df89e8187c7e90144a341f689fa
BLAKE2b-256 57b89ba693fd61ae306128953297a3155ed5c237119d4a15806469075dc90c09

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