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 and all the documentation in the wiki!
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.
shellman
is written in Python, so you must install it with pip
:
pip install shellman
Software licensed under ISC license.