From 6315a552d51ac08b60d25d8500da5574a83ba530 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 8 Nov 1995 12:42:16 +0000 Subject: [PATCH] Added descriptive text field in target info. Added authentication field in target info. --- www/egwindex.html | 10 +++---- www/query.egw | 9 ++++-- www/search.egw | 55 +++++++++++++++++++++---------------- www/showfull.egw | 79 ++++++++++++++++++++++------------------------------- www/targets.egw | 11 +++++--- www/wcgi.c | 8 ++++-- www/z39util.tcl | 26 ++++++++++-------- www/ztargets.conf | 60 +++++++++++++++++++++++++++++----------- 8 files changed, 145 insertions(+), 113 deletions(-) diff --git a/www/egwindex.html b/www/egwindex.html index f27315d..f6c7dfd 100644 --- a/www/egwindex.html +++ b/www/egwindex.html @@ -3,16 +3,14 @@ Europagate WWW index -

Europagate WWW index, $Id: egwindex.html,v 1.5 1995/11/07 10:44:30 adam Exp $

-

-egwcgi ref: - egwcgi +

Europagate WWW index, $Id: egwindex.html,v 1.6 1995/11/08 12:42:16 adam Exp $

z39 targets: targets.egw -
+(experimental)
Multiple z39 targets: - mtargets.egw + mtargets.egw (very experimental) +
diff --git a/www/query.egw b/www/query.egw index 9a72fe3..8f816be 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.9 1995/11/06 17:44:20 adam Exp $ +# $Id: query.egw,v 1.10 1995/11/08 12:42:17 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -36,16 +36,19 @@ proc ok-response {} { set setNo 1 } set hist($setNo,host) $host + set hist($setNo,idAuthentication) [lindex $targets($host) 3] if {[catch {z39 failback fail-response}]} { ir z39 } + + html "

Search in " [lindex $targets($host) 0] "

\n" + z39 callback ok-response z39 failback fail-response if {$host != $oldHost} { catch {z39 disconnect} - html "Connecting to target " $host "
\n" set sessionWait 0 if {[catch {z39 connect $host}]} { html "Cannot connect to target ${host}
\n" @@ -60,6 +63,7 @@ proc ok-response {} { } } set sessionWait 0 + z39 idAuthentication $hist($setNo,idAuthentication) if {[catch {z39 init}]} { htmlr "Cannot initialize with target ${host}
" htmlr "" @@ -74,7 +78,6 @@ proc ok-response {} { } set databases [lindex $targets($host) 1] - html "

Search in databases

\n" html {
} \n set nodb [llength $databases] diff --git a/www/search.egw b/www/search.egw index 76a4434..ebd2e66 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,33 @@ { -# $Id: search.egw,v 1.9 1995/11/07 14:56:59 adam Exp $ +# $Id: search.egw,v 1.10 1995/11/08 12:42:17 adam Exp $ + +proc buttons {setNo setMax startPos} { + global sessionId + global env + global hist + + html "

\n" + if {$setMax < [z39.$setNo resultCount]} { + html { Next } "| \n" + } + if {$startPos != "" && $startPos != "1"} { + html { Prev } "| \n" + } + html { New target } " | \n" + html { New query } "

\n" +} if {[info commands saveState] == ""} { source z39util.tcl @@ -70,33 +97,15 @@ if {$setMax > $endPos} { set setMax $endPos } + if {$setMax > 0} { + buttons $setNo $setMax $startPos + } } if {$setMax > 0} { z39present $setNo $setOffset $setMax display-brief } -} - -


-{ - if {$setMax < [z39.$setNo resultCount]} { - html { Next } "| \n" - } - if {$startPos != "" && $startPos != "1"} { - html { Prev } "| \n" - } - html { New target } " | \n" - html { New query } + buttons $setNo $setMax $startPos } { diff --git a/www/showfull.egw b/www/showfull.egw index 4eb9d66..0e0c228 100644 --- a/www/showfull.egw +++ b/www/showfull.egw @@ -1,36 +1,19 @@ { -# $Id: showfull.egw,v 1.4 1995/11/07 14:56:59 adam Exp $ +# $Id: showfull.egw,v 1.5 1995/11/08 12:42:17 adam Exp $ - if {[info commands saveState] == ""} { - source z39util.tcl - } - - html " WWW/Z39.50 Gateway Record " $host " \n" - html "\n" - - global setNo +proc buttons {setNo no} { + global sessionId + global env global hist - set sno [lindex $sessionParms 0] - set no [lindex $sessionParms 1] - - set setNo $sno - - if {[z39search $setNo 0] != "1"} { - return - } - set total [z39.$setNo resultCount] - html "

Record \#$no out of $total


\n" -} - -{ + html "

\n" if {$no < [z39.$setNo resultCount]} { html { Next } "| \n" } - if {$no > 0} { + if {$no > 1} { html { Prev } "| \n" @@ -43,35 +26,37 @@ html { New target } " | \n" html { New query } + html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo + html {"> New query } "

\n" } -{ - z39present $setNo $no $no display-full -} -


-{ - if {$no < [z39.$setNo resultCount]} { - html { Next } "| \n" + if {[info commands saveState] == ""} { + source z39util.tcl } - if {$no > 0} { - html { Prev } "| \n" + + html " WWW/Z39.50 Gateway Record " $host " \n" + html "\n" + + global setNo + global hist + + set sno [lindex $sessionParms 0] + set no [lindex $sessionParms 1] + + set setNo $sno + + if {[z39search $setNo 0] != "1"} { + return } - html { Result } "| \n" - - html { New target } " | \n" - html { New query } -} + set total [z39.$setNo resultCount] + html "

Record \#$no out of $total


\n" + + buttons $setNo $no + z39present $setNo $no $no display-full + + buttons $setNo $no +} diff --git a/www/targets.egw b/www/targets.egw index 0111e42..cf0232c 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,6 +1,6 @@ { -# $Id: targets.egw,v 1.5 1995/11/06 17:44:21 adam Exp $ +# $Id: targets.egw,v 1.6 1995/11/08 12:42:17 adam Exp $ source /usr/local/etc/httpd/conf/ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl @@ -27,9 +27,12 @@ Consejo Superior de Investigaciones Científicas
{ foreach t [array names targets] { - html {
} $t "\n" - html "
" [lindex $targets($t) 0] \n + html {
} [lindex $targets($t) 0] " \n" + set desc [lindex $targets($t) 4] + if {$desc != ""} { + html "
$desc\n" + } } }
diff --git a/www/wcgi.c b/www/wcgi.c index 0d55ccb..3a4dec6 100644 --- a/www/wcgi.c +++ b/www/wcgi.c @@ -41,7 +41,11 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wcgi.c,v $ - * Revision 1.6 1995/11/06 17:44:22 adam + * Revision 1.7 1995/11/08 12:42:18 adam + * Added descriptive text field in target info. + * Added authentication field in target info. + * + * Revision 1.6 1995/11/06 17:44:22 adam * State reestablised when shell restarts. History of previous * result sets. * @@ -295,7 +299,7 @@ int main() exit (1); } #else -# if 0 +# if 1 fcntl (linein, F_SETFL, O_NONBLOCK); # endif while (1) diff --git a/www/z39util.tcl b/www/z39util.tcl index 796fdd2..20fcec2 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.2 1995/11/07 14:57:00 adam Exp $ +# $Id: z39util.tcl,v 1.3 1995/11/08 12:42:18 adam Exp $ # proc saveState {} { uplevel #0 { @@ -71,7 +71,7 @@ proc display-brief {zset no} { set rtype [$zset recordType $no] if {$rtype == "SUTRS"} { html [join [$zset getSutrs $no]] - htmlr {
} + html "
\n" return } if {![catch { @@ -82,7 +82,7 @@ proc display-brief {zset no} { html $sessionId {/showfull.egw/} $setNo + $no {"> } $title {} html " ${year} " } - htmlr {
} + html "
\n" } proc display-full {zset no} { @@ -93,21 +93,21 @@ proc display-full {zset no} { if {$add != {}} { set add " :${add}" } - htmlr "
${no}
" - htmlr "Error ${err}${add}
" + html "

${no}

\n" + html "Error ${err}${add}
\n" return } if {$type != "DB"} { return } - htmlr "
${no}
" + html "

${no}

\n" set rtype [$zset recordType $no] if {$rtype == "SUTRS"} { - htmlr [join [$zset getSutrs $no]] + html [join [$zset getSutrs $no]] "
\n" return } if {[catch {set r [$zset getMarc $no line * * *]}]} { - htmlr "Unknown record type: $rtype" + html "Unknown record type: $rtype
\n" return } foreach line $r { @@ -118,8 +118,8 @@ proc display-full {zset no} { html "$tag " if {$l > 0} { for {set i 0} {$i < $l} {incr i} { - if {[string index $tag $i] == " "} { - html "_" + if {[string index $indicator $i] == " "} { + html "-" } else { html [string index $tag $i] } @@ -205,6 +205,7 @@ proc z39search {setNo piggy} { return 0 } } + z39 idAuthentication $hist($setNo,idAuthentication) set sessionWait 0 if {[catch {z39 init}]} { html "Cannot initialize with target ${host}
\n" @@ -397,7 +398,7 @@ proc z39present {setNo setOffset setMax dfunc} { } set got [z39.$setNo numberOfRecordsReturned] } - display-rec $setOffset [expr $got + $setOffset - 1] $dfunc + display-rec $setOffset [expr $got + $setOffset - 1] $dfunc z39 set setOffset [expr $got + $setOffset] set toGet [expr 1 + $setMax - $setOffset] wflush @@ -409,6 +410,7 @@ proc z39history {} { global hist global env global sessionId + global targets if {![info exists nextSetNo]} { return @@ -418,7 +420,7 @@ proc z39history {} { html {
} $hist($setNo,host) + html {"> } [lindex $targets($hist($setNo,host)) 0] if {[llength $hist($setNo,database)] > 1} { html ": " foreach b $hist($setNo,database) { diff --git a/www/ztargets.conf b/www/ztargets.conf index c868e74..41371f0 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.5 1995/11/06 17:44:24 adam Exp $ +# $Id: ztargets.conf,v 1.6 1995/11/08 12:42:18 adam Exp $ set commonFields { { Title {@attr 1=4} } { Author {@attr 1=1003} } @@ -9,55 +9,83 @@ set commonFields { } set targets(myriad.middlebury.edu) { - {University somewhere, bla bla} - {Default} + Myriad + Default { { Title {@attr 1=4} } { Author {@attr 1=1003} } { Abstract {@attr 1=62} } { Date {@attr 1=30} } { All {@attr 1=1016} } - } + } + {} + {Myriad} } set targets(rlg.stanford.edu) [list \ - {The famous Stanford University} \ + rlg \ {BKS AMC MAP MDF REC SCO SER VIM BIB} \ $commonFields \ + {} \ + {Research Libraries group, Stanford University} ] -set targets(bibsys) [list \ - {BIBSYS - Norway} \ +set targets(z3950.bibsys.no:2100) [list \ + BIBSYS \ BIBSYS \ $commonFields \ + {} \ + {BIBSYS - norway} \ ] set targets(dtbsun.dtv.dk:4500) [list \ - {Aleph, Z39.50 Server} \ + {Aleph} \ {DEM MAR} \ $commonFields \ + {} \ + {Aleph, Z39.50 Server on DTV} \ ] -set targets(ir.dbc.bib.dk) [list \ - {SR-DANBIB} \ - DANBIB \ - $commonFields \ +set targets(dtbsun.dtv.dk:210) [list \ + {SR-DanBib} \ + danbib \ + { { Title {@attr 1=4} } \ + { Author {@attr 1=1} } \ + { Abstract {@attr 1=62} } \ + { Date {@attr 1=30} } \ + { All {@attr 1=1016} } \ + } \ + {<>} \ + {SR Target DanBib trough the Europagate gateway} \ ] set targets(localhost:9999) [list \ - ztest9999 \ + Ztest9999 \ {ABE BETA} \ $commonFields \ + {} \ + {Test server on localhost} \ ] set targets(dtbsun.dtv.dk:9999) [list \ - zserver \ + Zserver \ {usgs esdd cd_rom unknown} \ $commonFields \ + {} \ + {New Index Data Z39.50 Server in alpha-test} \ ] set targets(z3950.research.att.com) [list \ - {AT&T Z39.50 Server} \ - {Default} \ + {AT&T Server} \ + Default \ $commonFields \ + {} \ + {Z39.50 Server at AT&T} \ ] +set targets(dranet.dra.com) [list \ + {Dranet} \ + drewdb \ + $commonFields \ + {} \ + {Data Research Z39.50 Server} \ +] -- 1.7.10.4