The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

How To Generate HTML From Script Comments

Hi all,

We use several different scripting languages here; TCL, Perl, Python, Windows command scripts, VBS, etc. Mostly just little programs to parse application logs, manipulate data files and such (no production or product scripts).

We have a standard set of comment tags, sort of like Javadoc tags but common across each scripting language. What I'd like to do is write a utility that can churn through a directory of scripts and spit out HTML pages from the script comment tags as documentation.

What would be the "best" way to do this?

Thanks,
Former COBOL Programmer
Monday, September 17, 2007
 
 
> What I'd like to do is write a utility

Your utility must:

1) Churn through a directory of scripts
2) Parse the comments from each script
3) Spit out HTML pages from the comments

Which of the above is difficult, and what's difficult about it?

> What would be the "best" way to do this?

Le mieux est l'ennemi du bien: instead of wondering about the "best" way, perhaps be satisfied with "good enough".
Christopher Wells Send private email
Monday, September 17, 2007
 
 
i agree: there is no "best" for such a simple thing.....

unless there are more requirements you didnt tell (size, performance, deploy....)
Johncharles Send private email
Monday, September 17, 2007
 
 
You could certainly do this with PHP using regex to pull out the relevant parts, so I'd be very surprised if you couldn't do it in Perl (although I don't know enough Perl to be able to help you). Failing that, I would imagine that almost any of the scripting languages that you mentioned could do something similar.
Paul Brown Send private email
Tuesday, September 18, 2007
 
 
I think Doxygen recognises most mainstream languages.
http://www.stack.nl/~dimitri/doxygen/
Troels Knak-Nielsen Send private email
Tuesday, September 18, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz