Making a simple file server for unix
timbl@www2.cern.ch
Date: Tue, 26 May 92 15:55:11 GMT+0100
From: timbl@www2.cern.ch
Message-id: <9205261455.AA00465@ www2.cern.ch >
To: John O'Neall <JON@frcpn11.in2p3.fr>
Subject: Making a simple file server for unix
Cc: www-talk@nxoc01.cern.ch
> Date: Tue, 26 May 92 09:16:33 EST
> From: John O'Neall <JON@frcpn11.in2p3.fr>
John,
Thanks for your mails asking about how to make a simple hypertext
list of files.
Let me take your model of the three layers. I sugest that the 1st
layer
>helppage (1st-layer): various info and pointers to local
> info that won't change much as well as to WWW proper.
> Among other things, it'll point to a [...]
you write by hand. You can read the HTML documentation in
http://info.cern.ch/hypertext/WWW/MarkUp/MarkUp.html
or you can just copy another node which looks like what you want.
(Get its address and then read it with www -source address). Or both.
You might want to put pointers to the general subject index, and the
index of HEP sites. Let me know when you set up a server so that I
can put in on the list!
For the second layer,
> 2nd-layer list: this is the thing that will point to ALL the
> local flat files. Then I need an automatic (cron'd) procedure
> to regenerate the list every time I add more flat data
> files (or periodically).
This is easy: you generate it with a little shell script. How about
the one appended to this message? It generates a hypertext menu of
files in a set of directories (passed as arguments). You can massage
it to put in your own title, heading, etc. If you can generate some
human-readable description of each file, so much the better. You
could run this as a cron job into an Overveiw.html file which you
then publish with httpd, or run it from a server daemon script so
that the list is generated fresh for every read, and always
up-to-date.
The third layer is your set of files. If you publish these with a
server script, you can add to each one a title (if you can generate
it) and maybe a link back to the list of other documents befre you
just send the plain text file.
You could read some of the tips on the web about ettiquette, etc.
>By the way, if such a list already exists in W3 somewhere, I'll be
>happy to point to it too. And then there's no reason why our server
>shouldn't be accessible to the rest of W3.
It would be a great addition to the web! Let me know when it's up
and I'll put pointers to it from some overview documents. (evn at the
experimental stage, I'll mark the links "experimental" if you like).
>Tim, any chance of getting the hypertext editor for something other
>than Next one day? I realize that was the simplest thing to develop
>it on, but I suspect it's not the commonest workstation in HEP.
It's on the "hit-list" and we're lookig for volunteers. Maybe the Mac
browser will be the first to be also an editor. Or maybe one of hte X
browsers. I agree the NeXT is not the most common platform! (Though
it is neat ;-)
>Excuse me for rushing, but I'm supposed to present this project to
the
>HEPIX-F meeting in Paris on Tuesday and this weekend will be a long
one
> (at least, in France).
Good luck! Mail cailliau@(I'm off to the US -- so I'm rushing too!)
Mail me or www-talk@info.cern.ch if you have any problems...
If you have smart ideas, circulate them to this list too.
Tim
__________________
#! /bin/sh
# Generate hypertext menu from directory list
echo "<TITLE>Information under: $*</TITLE>"
echo "<H1>$*</H1>"
# If there is a README file include that as plain text
if [ -f $1/README ]; then
echo "<XMP>"
cat $1/README
echo "</XMP>"
fi
# Now generate a list of links to files
echo "<DIR>"
for dir in $*
do (
cd $dir
for file in *.html *.txt
do
echo "<LI><A HREF=./$dir/$file>Title of $file</A>"
done
)
done
echo "</DIR>"