WWW at NIKHEF

Introduction

The www browser has been installed at NIKHEF in November 1991. The main purpose was to provide easy access to the databases on CERNVM (phonebook, news, XFIND). The popularity of www increased when the SPIRES preprint index became accessible via www.

In February 1992 the WWW server (httpd) has been installed on a SUN. Experience has shown that it is very easy to make existing information available to the world wide web.

Installation of the browser

The installation of the browser is straightforward:

Installation of the daemon

Keyword search

The code provided by CERN will not perform a keyword search. A modification in HTRetrieve.c makes this possible: if (keywords) { /* if (TRACE) fprint("HTHandle: can't perform search %s\n", arg); HTWriteASCII(soc, "Sorry, this server does not perform searches.\n"); */ ip = string; command = "/user/a03/bin/WWW.sh "; for (;*command!='\0';) *ip++ = *command++; for (;*arg!='\0';) *ip++ = *arg++; *ip++ = '?'; for (;*keywords!='\0';) *ip++ = *keywords++; system (string); return fd; }

Example 1: Phone Directory

Let us take the telephone directory as an example. The document Phone.html starts with the tag <isindex>: <isindex> <TITLE>NIKHEF-H Telephone Directory </TITLE> Gives telephone number, office number, email address and date of last access on central NIKHEF server. <p> Four digit numbers can be dialed directly: +31 20 592 xxxx <p> Five digit numbers (81xxx) are beep numbers: dial +31 20 5920 xxx <p> Provide name as keyword.<p> When looking for willem HTRetrieve calls the script WWW.sh name=`echo $@ | awk -F? '{print $1}'` keys=`echo $@ | awk -F? '{print $2}'` name=`basename $name .html` /user/a03/bin/$name.sh $keys with the parameter Phone.html?willem.

This results in a call to the script Phone.sh:

name=$1 echo "<title> $name at NIKHEF</title>" echo "<h1> $name</h1>" grep -i $name /user/a03/www/default/phone.html with parameter willem.

A grep -i willem is done on a file which contains accounting information of the central server of NIKHEF-H. For willem this works fine, for jan --- a common name in the Netherlands --- this too simple approach will also give the information about users whose last login was in January.

Example 2: Preprint Index

The file Preprint.html contains the NIKHEF-H preprints. <isindex> <title>Preprints NIKHEF-H</title> <h1>Preprints NIKHEF-H</h1> <p>NIKHEF-H 92-05<p>Kalau, W.<p>On Gupta-Bleuler quantization of systems with second-class constraints<p>February 1992, 16p <p>--------------<p> <p>NIKHEF-H 92-04<p>Holten, J.W. van<p>BRST field theory of relativistic particles<p>February 1992, 16p <p>--------------<p> An index of this file is made with the command /usr/lib/refer/mkey Preprint.html | /usr/lib/refer/inv Index When the name kalau is given as a keyword to this script: name=$1 echo "<title> $name in NIKHEF-H preprints </title>" echo "<h1> $name</h1>" # echo $name | /usr/lib/refer/hunt /user/a03/www/default/Index we get the following result: <title> kalau in NIKHEF-H preprints </title> <h1> kalau</h1> <isindex> <title>Preprints NIKHEF-H</title> <h1>Preprints NIKHEF-H</h1> <p>NIKHEF-H 92-05<p>Kalau, W.<p>On Gupta-Bleuler quantization of systems with second-class constraints<p>February 1992, 16p <p>--------------<p> <p>NIKHEF-H 91-04<p>Kalau, W., Holten, J.W. van<p>BRST cohomolgoy and BRST gauge fixing <p>--------------<p> <p>NIKHEF-H 91-03<p>Kalau, W.<p>Ashtekar formalism with real variables <p>--------------<p>