Documentation generator for Bash?
Is there a documentation generator for bash? I know this sort of seems a little strange (the idea I suppose). I would like to generate HTML from my files as per a JavaDoc like API.
Does anyone know of anything like this, and can you point me to it if you do know of something like this. I think Doxygen does not support this but I could be wrong.
L-
Edit: 'does support' to 'does not' (original intention).
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
what do you mean 'for bash'? Do you mean a tool you can run on the shell, or a script?
"It's such a useful tool for living in the city!"
Right, I thought about this afterward -- sorry -- I mean 'for' Bash scripts themselves pulling documentation from them already written as comments in Bash scripts. Though if it were written in Bash that would be fine I suppose.
L-
L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
If you don't need any advanced features beyond binding a comment to a function or code block then you could consider writing one yourself. It might take a few hours but shouldn't be too difficult.
Yeah, I could write one, but why, I suppose.
I would rather spend my time doing something else...but oh well.
I get this vague feeling that the sever lack of documentation in C programs also translates into all *nix documentation being a kind of obscura. Could be me.
L-
I would rather spend my time doing something else...but oh well.
I get this vague feeling that the sever lack of documentation in C programs also translates into all *nix documentation being a kind of obscura. Could be me.
L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
I'm not really understanding what it is you want, but perhaps you should take a look at doxygen. I've used it a bit, and it's quite easy to use.
I just want to generate documentation from Bash scripts I have written and plan on writting. By embedding the documentation in the comments and having a program/script extract the comments and format them into nice HTML files.
L-
L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
Yes, that's why I suggested doxygen. It extracts comments from files and builds documentation from it. It does however use a special syntax on the comments, so you might have to re-format your old comments, but that shouldn't be too hard. The only problem is that I'm not sure if it works with bash-scripts...
Quote: Original post by Lucidquiet
Yeah, I could write one, but why, I suppose.
I would rather spend my time doing something else...but oh well.
I get this vague feeling that the sever lack of documentation in C programs also translates into all *nix documentation being a kind of obscura. Could be me.
L-
There are oodles of documents for Unix. My documents are overflowing man! Really, learn your distro. You can start with devbook. It's the Gnome projects help format.
There are tools like c2html and perl2html, but they translate entire source code so how useful it is too you is questionable.
what you probably want is doxygen. You can use bash to walk the directories and generate the files. Or better to use Perl and forget about bash scripts. But if all you want is to walk some files in a directory, you can do it with bash quickly
for FILE in *.c; do [html document conversion]; done;
It's a very simple script, bash rather sucks though and gets annoying very fast.
"It's such a useful tool for living in the city!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement