3

(edited per suggestions)

How do you extract all the GUI styles with descriptions in Rebol3 after load-gui is evaluated?

kealist
  • 1,669
  • 12
  • 26
  • It should be possible, with a small script, to auto-generate a nice document that describes all of the GUI styles, and even generate a nice HTML summary page. – rebol Jul 09 '13 at 04:05
  • Not sure I have the PARSE ability to do that, but it sounds great, Carl – kealist Jul 10 '13 at 05:16
  • 1
    @kealist this ought to be a start: `load-gui do http://reb4.me/r3/rsp style-info: collect [foreach [name style] body-of guie/styles [keep form name keep style/about]] render-each [name about] style-info {

    <%== name %>

    ^/

    <%== about %>

    ^/}`
    – rgchris Jul 10 '13 at 05:38
  • @rgchris Thank you, I'll play around with that to get it. I need to prepare some r3 documents for other thick-headed people like myself to learn how to do GUI stuff – kealist Jul 11 '13 at 03:25
  • How about rewording your question to reflect the answer Chris provided ...ie. how do you extract all the GUI styles with descriptions in Rebol3 after load-gui is evaluated? – Graham Chiu Jul 14 '13 at 03:43
  • @GrahamChiu Done, but I guess it was already closed. – kealist Jul 14 '13 at 03:55
  • Nope, it has been opened again :) – Graham Chiu Jul 15 '13 at 04:41
  • I posted a comment to the admin who closed it and he removed the comment and opened it – kealist Jul 15 '13 at 16:35

1 Answers1

1

from @rgchris, an initial idea:

REBOL []
load-gui 
do http://reb4.me/r3/rsp 

style-info: collect [
    foreach [name style] body-of guie/styles [
        keep form name keep style/about
    ]
] 

styles-list: render-each [name about] style-info {<h1><%== name %></h1>^/<p><%== about %></p>^/}

write %styles-list.html styles-list
kealist
  • 1,669
  • 12
  • 26