Hi xjohnson,
You can use
parse webpage [ to </HTML> cursor: (insert cursor {some new text. ^/}) to end]
where webpage is a string containing the webpage, such as the result of doing
webpage: read %somefile.html
Here is an example:
>> webpage: { <HTML>
{ <HEAD> Some head stuff
{ more head stuff
{ </HEAD>
{ <BODY>
{ some body stuff
{ more body stuff
{ </HTML>
{ }
== { <HTML>
<HEAD> Some head stuff
more head stuff
</HEAD>
<BODY>
some body stuff
more body stuff
</HTML>
}
>> parse webpage [ to </HTML> cursor: (insert cursor {some new text. ^/})
to end]
== true
>> print webpage
<HTML>
<HEAD> Some head stuff
more head stuff
</HEAD>
<BODY>
some body stuff
more body stuff
some new text. <============= here it is!
</HTML>
>>
Hope this helps,
Elan
At 03:52 PM 12/5/99 -0400, you wrote:
>Does anyone know how to add a footer to all the pages on a web site?
>This is as far as I've gotten.
>
>prin "Enter filename: "
>file: make file! input
>page: parse read file ""
>len: length? page
>place: len - 1
>insert page/:place {<blockquote><b><font size=-2>Send any comments
>concerning this page to
>[EMAIL PROTECTED]</font></b>
><br><b><font size=-2>This page was last updated on Dec.
>5,1999</font></b>
><br><b><font size=-2>Copyright (c)1999 Pacwill Holdings Ltd. All Rights
>Reserved</font></b></blockquote>}
>
>There are several problems with this one of which is it inserts the
>'curly' brackets as well.
>It looks ok until I save it. How does one go from a series to a file
>while preserving the format.
>Or am I way out in left field? :)
>
>
>