Docs...
[1/5] from: webmaster:starforge at: 27-Oct-2000 19:06
Hi,
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..
Chris
--
New sig in the works
Explorer 2260, Designer and Coder
http://www.starforge.co.uk
--
Tact, n.:
The unsaid part of what you're thinking.
[2/5] from: joel:neely:fedex at: 27-Oct-2000 13:43
Hi, Chris,
I don't know off-hand of an HTML-speaking version, but HELP does something
similar in plain text...
>> glomp: func [
[ {Snorkle the arguments and return their frammish}
[ a [number! any-block!] "the leveraged blodginator"
[ b [date! logic! char!] "the particulated fnurdlitch"
[ ][
[ ; obscure details omitted
[ ]
>> ? glomp
USAGE:
GLOMP a b
DESCRIPTION:
Snorkle the arguments and return their frammish
GLOMP is a function value.
ARGUMENTS:
a -- the leveraged blodginator (Type: number any-block)
b -- the particulated fnurdlitch (Type: date logic char)
and you can use
source help
to look at how it obtains all that information. It shouldn't be too
hard to make a variation that emitted HTML.
-jn-
[rebol-bounce--rebol--com] wrote:
> Hi,
> Is there a script anywhere that does a similar job to Java's
<<quoted lines omitted: 16>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677
REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip
do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] {
| e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]
[3/5] 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
<<quoted lines omitted: 4>>
> 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
]
[4/5] from: chris:starforge at: 27-Oct-2000 20:53
#27-Oct-00# Message from *Joel Neely*:
Hi Joel,
> Hi, Chris,
> I don't know off-hand of an HTML-speaking version, but HELP does something
> similar in plain text...
<snip>
Ah, guess I didn't make it too clear what I was after. I knew about help
(although I didn't know I could get at the source.. that could come in
handy) but it doesn't do quite as much as I'd want. Javadoc scans java
sources for comments that start with "/**", using the comments and
special tags to construct documents for the source fairly similar in
apperance and layout to the full the API spec at
http://java.sun.com/j2se/1.3/docs/api/overview-summary.html
What I'm looking for is something that scans Rebol sources and uses
the information in the header and comments in the code to construct
similar documentation for a file. Guess I'll have to get hold of the
script parsing examples from the library and see if I can work out
how to implement something (I must need my head seeing too for this...)
Chris
--
New sig in the works
Explorer 2260, Designer and Coder
http://www.starforge.co.uk
--
User n.:
Unfortunate side effect of programming. Solution: Axe job.
[5/5] from: webmaster:starforge at: 27-Oct-2000 20:58
#27-Oct-00# Message from *Joel Neely*:
Hi Joel,
.. don't know if this got through, I've been having fun with the rebol
list server :/
> Hi, Chris,
> I don't know off-hand of an HTML-speaking version, but HELP does something
> similar in plain text...
<snip>
Ah, guess I didn't make it too clear what I was after. I knew about help
(although I didn't know I could get at the source.. that could come in
handy) but it doesn't do quite as much as I'd want. Javadoc scans java
sources for comments that start with "/**", using the comments and
special tags to construct documents for the source fairly similar in
apperance and layout to the full the API spec at
http://java.sun.com/j2se/1.3/docs/api/overview-summary.html
What I'm looking for is something that scans Rebol sources and uses
the information in the header and comments in the code to construct
similar documentation for a file. Guess I'll have to get hold of the
script parsing examples from the library and see if I can work out
how to implement something (I must need my head seeing too for this...)
Chris
--
New sig in the works
Explorer 2260, Designer and Coder
http://www.starforge.co.uk
--
User n.:
Unfortunate side effect of programming. Solution: Axe job.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted