I'm writing a rebol script to list files in a directory when the rebol
file is opened with a browser, and I have two questions, maybe related,
maybe not...
Preliminary info: NCSA httpd server running on IRIX 6.2; rebol script is
an executable file named test.cgi, and the server runs executable files
with the .cgi extension no matter where they are (not a publicly
accessible server, natch!).
The questions:
1. The first line of the test.cgi script is:
#!/usr/people/marj/rebolStuff/rebol -q
What difference would it make to add the -c to that line? The script
works without it. Would the output of print statements be different or
anything? I couldn't find a description of exactly what -c _does_, in
the documentation.
2. I would like to (if possible) use the Title that's within the REBOL
header as the title of the ouput - that is, put it within the TITLE tag
and within an H1 tab. Does the header object have a name that I can
access? (couldn't find it in the documentation)
The current version of the script is attached below. Not particularly
elegant, and not at all portable -- but I'm not a "real" programmer and
figured I'd learn more by seeing how much I could accomplish without
copying from any examples, so be nice ;-)
thanks!
Marj
--
Marj Tiefert, [EMAIL PROTECTED] phone: +858-799-5580
Principal Scientific Writer and Documentation Website Manager
Molecular Simulations Inc http://www.msi.com/
#!/usr/people/marj/rebolStuff/rebol -q
REBOL [
Title: "Status of Generated LinkScan Reports"
Date: 03-Feb-2000
Version: 0.1.3
Author: "Marjorie A. Tiefert"
Rights: "Copyright (C) 2000 MSI"
]
print [ "Content-type: text/html" newline newline
<HTML> newline
<HEAD> newline
<LINK REL="STYLESHEET" TYPE="text/css"
HREF="http://metro.msi.com/people/marj/common/styles/workStyle.css">
newline <TITLE>"Generated LinkScan Reports"</TITLE> newline
; newline <TITLE> Title </TITLE> newline
</HEAD> newline
<BODY> newline
join "<H1>" [
<IMG SRC="http://metro.msi.com/people/marj/common/graphics/work.gif"
WIDTH="100" HEIGHT="66" BORDER="0" ALIGN="LEFT">
"Status of LinkScan-Generated Reports" </H1> ]
newline <BR CLEAR="LEFT"> newline
<HR> newline
<TABLE ALIGN="CENTER" WIDTH="80%" BORDER="1">
]
subdirs: read %.
print join "<TR>" [
<TH>"LinkScan project" newline " "
<TH COLSPAN="2">"Reports last generated"
</TR>
]
foreach dir ( sort subdirs ) [
if dir? dir [
files: read dir
if exists? dir/SummaryStats.html [
ref: build-tag [ A HREF ( dir ) ]
prin [ join "<TR>" [ <TD> ref dir </A> newline ] ]
gmtdate: modified? dir/SummaryStats.html
zone: gmtdate/zone
date: gmtdate + zone
either now/date - date/date > 1 [
print join " " [ <TD> date/date <TD> date/time </TR> ]
][
print join {<TD BGCOLOR="#FFFFCF">} [ date/date
<TD BGCOLOR="#FFFFCF"> date/time </TR> ]
]
]
]
]
print join "</TABLE>" [ newline
<HR> newline
<P><A HREF="/people/marj/personal.html">"Marj home page"</A></P>
newline <ADDRESS>"Copyright Molecular Simulations Inc"</ADDRESS>
newline </BODY> newline
</HTML> newline
]
quit