[REBOL] Re: Docs...
From: jeff:rebol at: 27-Oct-2000 10:57
> Is there a script anywhere that does a similar job to
> Java's "javadoc" tool, something that picks up special
> comments in a script and uses them to make HTML
> documentation? I realise that Rebol code is supposed to be
> self documenting, but it would make development of large
> packages of scripts easier if there was a way to
> automagicaly export documentation comments for functions in
> the script to a well structured document..
Howdy, Chris:
Here's a script I use:
REBOL [
Title: "Doc Script"
Purpose: {
If you have a number of REBOL source
files that just contain a bunch of functions
this script will print out help for all
those functions. You can capture output with
ECHO.
}
]
help-funcs: func [
src [string!]
/local item
][
until [
set [item src] load/next src
if set-word? :item [
print [uppercase form :item newline]
do compose [ help (to-word :item)]
print "^/====================================^/"
]
any [none? src tail? src]
]
]
s-files: [%file1.r %file2.r]
foreach file s-files [
do file
help-funcs read file
]