On 10/1/2000 at 3:24 PM [EMAIL PROTECTED] wrote:
> It should be possible using Rebol's reflection of words to be able to
automatically scan all of system/words, and write a small HTML page for
each
word, that contains basically what 'help and 'source provide.
Attached is a script Andrew Grossman used to build the Wiki Dictionary
on REBOL.ORG. Like POST.R it seemed to break under later releases.
-Ted.
#!/home2/husted/www/cgi-bin/rebol -cs
REBOL [
title: "dict manypage generator"
author: "Andrew Grossman"
date: 12-Sept-99
]
res: read http://www.rebol.com/dictionary.html
res: find/tail res {</CENTER>}
res: find/tail res {</CENTER>}
words: make block! []
output: make string! ""
while [true] [
either found? res: find/tail res {<CENTER>} [
parse res [copy wordtable to {<CENTER>} skip to end]
parse wordtable [skip thru {<B><FONT COLOR="black">} copy word to
{</FONT>} skip to end]
parse word [ "**" (word: copy "starstar") |
"*" (word: copy "star")
|
"/" (word: copy "slash")
|
"+" (word: copy "plus")
|
"-" (word: copy "minus")
|
"<=" (word: copy "lessthanoreq")
|
"<" (word: copy "lessthan") |
">=" (word: copy "greaterthanoreq")
|
">" (word: copy "greaterthan")
]
op: make string! copy wordtable
op2: make string! ""
parse wordtable [copy op to {<P><I>Related} skip to {</TD>} copy op2
to end]
write to-file word join {<CENTER>^/} [op op2]
append words word
; print word
] [break]
]
foreach wrd words [
append output rejoin [{<a href="wiki-qrd.r?wiki=} wrd {">} wrd {</a> <b>-</b>
^/}]
]
;for n 1 7 1 [
; remove at output length? output
;]
output: join {<center><font face="Arial, Helvetica" size=4><b> REBOL.org Wiki and
Quick-Reference Dictionary</b></font></center>^/<br><br><font face="Arial, Helvetica"
size=3>} [output {</font>}]
write %index output