Linux - Generate documentation from Bash scripts
When writing Bash scripts, I'm always putting some description block in front of any functions like I do in any language (think to PHP Docblock).
With PHP, there are a few tools like phpDocumentor for extracting these blocks and generate documentation but do such tools exist for Bash? I don't know, I haven't found any.
So I've written a small Bash script to accomplish this i.e. parse any .sh
file present in a folder, extract doc blocks and create one markdown document for any retrieved script. Each function's documentation will then be copied in Markdown, then a table of contents will be appended and, finally, a generic readme.md file will display the list of markdown files retrieved.