bashdoc is a small utility to make documentation automatically from bash scripts, using awk to frontend parser (and you can add your own frontends in awk language), and reStructuredText as backend parser. bashdoc parse the object script (using awk) and create an intermediate documentation in RST, which is parsed in next step using RST backend.
The fronted allows you to parse more complicated scripts (or other than bash scripts) and the backend allows you to make the output in different formats.
You can download the source code from launchpad project page or using bzr version control system:
$ bzr get lp:bashdoc