home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
networking
/
worldwideweb
/
mosaic_1.2_as225r2
/
rexx
/
add-hotlist.www
next >
Wrap
Text File
|
1994-07-04
|
1KB
|
55 lines
/*
* A QAD hack to keep a hotlist for Amiga Mosaic 1.2.
*
* Copyright 1994, Mike W. Meyer
*/
/* Argument parsing - what there is of it */
parse arg infile outfile
if infile = "" then infile = "envarc:Mosaic/hotlist.html"
if outfile = "" then outfile = "env:Mosaic/hotlist.html"
/* Get the line to be added */
options results
'get url'
url = result
'fetch title'
new = '<MENU><A HREF="'url'">'result'</A>'
/* Get my two file handles */
nofile = ~open(infile, infile, 'Read')
if ~open(outfile, outfile, 'Write') then exit 10
/*
* Copy (or create) the header. Everything up to the first blank line
* in the input file is header, and left alone.
*/
if nofile then do
call writeln outfile, "<HTML><HEAD><TITLE>Hotlist</TITLE></HEAD>" ,
"<BODY><H1>Pages of interest</H1><MENU>"
call writeln outfile, ""
end
else
do until line = ""
line = readln(infile)
call writeln outfile, line
end
/* Add the new line */
call writeln outfile, new
/* Now copy the rest */
if nofile then
call writeln outfile, "</MENU></BODY></HTML>"
else
do until eof(infile)
line = readln(infile)
call writeln outfile, line
end
/* Clean up, and copy outfile back to infile */
call close outfile
call close infile
address command 'copy' outfile infile
exit 0