from Louis Turk on the altme rebol3 world

Would someone on the rebol mail list please post the following script
for whoever might find it useful?

Here is a simple script to download the rebol core and dictionary
documentation to your harddrive.
Simply run the program. it will make appropriate folders and download the files.

rebol []
make-dir %/c/rebol-docs/
make-dir %/c/rebol-docs/graphics/
make-dir %/c/rebol-docs/words/
change-dir %/c/rebol-docs/

page: copy read http://www.rebol.com/docs/core23/rebolcore.html

write %rebolcore.html page
write %graphics/doc-bar.gif read http://www.rebol.com/graphics/doc-bar.gif

links: []
parse page [some [thru {<A HREF="}  copy temp to {"} (append links
temp)] to end]

foreach link links [
        if not find link "http:" [
            print ["Downloading: " link]
                write to-file link read to-url rejoin
["http://www.rebol.com/docs/core23/"; link]
        ]
]

page: copy read http://www.rebol.com/docs/dictionary.html
write %dictionary.html page
links: []
parse page [some [thru {<A HREF="}  copy temp to {"} (append links
temp)] to end]

foreach link links [
        if not find link "http:" [
            print ["Downloading: " link]
                write to-file link read to-url rejoin 
["http://www.rebol.com/docs/"; link]
        ]
]
print ""
ask "Finished. hit <ENTER> to quit."
quit
-- 
   ... nice weather   eh
-- 
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.

Reply via email to