Sorry, I changed and posted the script without testing it (should know better than 
that by now)... this one works.

Terry Brownell
[EMAIL PROTECTED]
www.lfred.com

REBOL [
Title: "It's Mine Now 1.1"
Date: 10-Mar-2001
Author: "Terry Brownell"
File: %pathmaker.r
Purpose: {To set relative paths to complete URL's in
Rebol read HTML for archiving purposes.}
Category: [web related]
]

the-url: to-url ask "What domain?: " 

the-doc: read the-url
parse the-doc [thru "<head>" copy the-header to "</head>"]

if not found? find the-header {<base href="}[add-base: rejoin [{<base href="} the-url 
{">}]insert find the-doc "</head>" add-base]

; An example.. the following line will replace a occurences of the word "the" with a 
link to my agent LFReD (cheap plug)

replace/all the-doc "the " {<a href="http://www.lfred.com"> LFReD </a>}

; Print or save the doc
;print the-doc
;write %its-mine-demo.htm the-doc

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to