From 477f50c9d787630be21ebe9ae137dd5515c71a87 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 15 May 1996 18:43:37 +0000 Subject: [PATCH] More work! --- www/Makefile | 7 ++---- www/msearch.egw | 21 ++++++----------- www/nwi.egw | 68 +++++++++++++++++++++++++++++++++++++++++++++++++---- www/search.egw | 22 +++++++++++++---- www/z39util.tcl | 20 ++++++++++------ www/ztargets.conf | 18 ++++++++------ 6 files changed, 114 insertions(+), 42 deletions(-) diff --git a/www/Makefile b/www/Makefile index 0e2a4fb..168a465 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,7 +1,7 @@ # Makefile for www gateway utility # Europagate, 1995 # -# $Id: Makefile,v 1.38 1996/04/25 10:22:20 adam Exp $ +# $Id: Makefile,v 1.39 1996/05/15 18:43:37 adam Exp $ # SHELL=/bin/sh @@ -19,9 +19,6 @@ OLIB=../lib/util.a ../lib/libres+log.a TCLLIB=/usr/local/lib/libtcl7.5.a TCLINC= -WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \ - mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw \ - sameas.egw nwi.egw nwiutil.tcl HSCRIPTS=egwindex.html CONFFILES=egw.res ztargets.conf TPROG1=egwcgi @@ -110,7 +107,7 @@ install.script: echo "Making directory $(HTDOCS)"; \ mkdir $(HTDOCS); \ fi - @for x in $(WSCRIPTS); do \ + @for x in *.egw *.tcl; do \ echo Installing $$x; \ cp $$x $(EGWDIR)/$$x; \ done diff --git a/www/msearch.egw b/www/msearch.egw index 5544a3c..4e501bd 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,6 +1,6 @@ { -# $Id: msearch.egw,v 1.21 1996/03/14 11:50:45 adam Exp $ +# $Id: msearch.egw,v 1.22 1996/05/15 18:43:37 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -46,23 +46,16 @@ incr nextSetNo for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { - set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3] + set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 6] } set hist($setNo,scan) 0 - set hist($setNo,form,menu1) [egw_form menu1] - set hist($setNo,form,menu2) [egw_form menu2] - set hist($setNo,form,menu3) [egw_form menu3] - - set hist($setNo,form,entry1) [egw_form entry1] - set hist($setNo,form,entry2) [egw_form entry2] - set hist($setNo,form,entry3) [egw_form entry3] - - set hist($setNo,form,logic1) [egw_form logic1] - set hist($setNo,form,logic2) [egw_form logic2] - set hist($setNo,form,logic3) {} - + for {set i 1} {$i < 6} {incr i} { + set hist($setNo,form,menu$i) [egw_form menu$i] + set hist($setNo,form,entry$i) [egw_form entry$i] + set hist($setNo,form,logic$i) [egw_form logic$i] + } set hist($setNo,maxPresent) [egw_form hits] if {$hist($setNo,maxPresent) == ""} { set hist($setNo,maxPresent) 20 diff --git a/www/nwi.egw b/www/nwi.egw index fe69daa..a383ecc 100644 --- a/www/nwi.egw +++ b/www/nwi.egw @@ -1,6 +1,6 @@ { -# $Id: nwi.egw,v 1.5 1996/03/15 14:43:44 adam Exp $ +# $Id: nwi.egw,v 1.6 1996/05/15 18:43:37 adam Exp $ source ztargets.conf set scriptQuery nwi.egw @@ -53,6 +53,7 @@ set curEntry {} set initSet 0 + catch { set initSet [lindex $sessionParms 0] if {$initSet < 0} { @@ -79,10 +80,11 @@ html {
and search the following servers
} - foreach t { + set hosts { + {mars.dtv.dk:9999/Default} {nwi.ub2.lu.se/sverige} - {nwi.ub2.lu.se/new_nor_lib} - } { + } + foreach t $hosts { html {
\n" + html {} + + html "\n


\n" + + if {0} { + html {
} \n + } + + html {Advanced search
} + + set host [lindex $hosts 0] + set fields [lindex $targets($host) 2] + for {set no 2} {$no < 6} {incr no} { + + html {\n" + + html {} \n + if {$no < 5} { + html {\n" + } + html "
\n" + } + unset hosts + html "

\n" set useIcons 0 button-main + catch maintenance } diff --git a/www/search.egw b/www/search.egw index 88969cd..a4416d7 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.39 1996/03/14 11:50:48 adam Exp $ +# $Id: search.egw,v 1.40 1996/05/15 18:43:38 adam Exp $ proc start-scan {scanNo targetNo cache dir initSet} { global sessionId @@ -39,6 +39,9 @@ proc start-scan {scanNo targetNo cache dir initSet} { egw_log debug "z39_scan failed" return } + if {!$useIcons} { + html "\n | " + } html {} @@ -46,9 +49,12 @@ proc start-scan {scanNo targetNo cache dir initSet} { html {} } else { - html {Previous Terms | } + html {Previous Terms} } + if {!$useIcons} { + html "\n | " + } html {} @@ -56,7 +62,7 @@ proc start-scan {scanNo targetNo cache dir initSet} { html {} } else { - html {Next Terms | } + html {Next Terms} } html {} } @@ -131,6 +137,9 @@ proc start-scan {scanNo targetNo cache dir initSet} { button-main + if {!$useIcons} { + html "\n | " + } html {} @@ -138,9 +147,12 @@ proc start-scan {scanNo targetNo cache dir initSet} { html {} } else { - html {Previous Terms | } + html {Previous Terms} } + if {!$useIcons} { + html "\n | " + } html {} @@ -148,7 +160,7 @@ proc start-scan {scanNo targetNo cache dir initSet} { html {} } else { - html {Next Terms | } + html {Next Terms} } html {} button-new-query $setNo diff --git a/www/z39util.tcl b/www/z39util.tcl index e893729..7ee6cf2 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.43 1996/03/26 16:27:03 adam Exp $ +# $Id: z39util.tcl,v 1.44 1996/05/15 18:43:38 adam Exp $ # proc saveState {} { uplevel #0 { @@ -727,15 +727,16 @@ proc build-query {t ilines} { egw_log debug "attr failed for $t" set attr [lindex [lindex [lindex $targets($t) 2] 0] 1] } + egw_log debug "op=${op}" switch $op { And - { set q "@and $q ${attr} \"${term}\"" } + { set q "@and $q ${attr} \"${term}\""; egw_log debug AND } Or - { set q "@or $q ${attr} \"${term}\"" } - {And not} - { set q "@not $q ${attr} \"${term}\"" } + { set q "@or $q ${attr} \"${term}\""; egw_log debug OR } {} - { set q "${attr} \"${term}\"" } + { set q "${attr} \"${term}\""; egw_log debug NOPE } + default + { set q "@not $q ${attr} \"${term}\""; egw_log debug ANDNOT } } set op [egw_form logic$i] } @@ -1641,7 +1642,10 @@ proc z39history {} { html {">Query: } } set op {} - for {set j 1} {$j <= 3} {incr j} { + for {set j 1} {$j <= 10} {incr j} { + if {![info exists hist($setNo,form,entry$j)]} { + break + } if {[string length $hist($setNo,form,entry$j)] > 0} { html " " [join $op " "] " " set pre [join $hist($setNo,form,menu$j)] @@ -1847,6 +1851,7 @@ proc mkAssoc {assoc host} { wais $assoc } else { ir $assoc + $assoc maximumRecordSize 1000000 } } else { if {![string compare [lindex $targets($host) 1] WAIS]} { @@ -1855,6 +1860,7 @@ proc mkAssoc {assoc host} { } else { if {[$assoc comstack] == "tcpip"} return ir $assoc + $assoc maximumRecordSize 1000000 } } } diff --git a/www/ztargets.conf b/www/ztargets.conf index e2c58e5..062fed8 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.33 1996/04/25 10:22:21 adam Exp $ +# $Id: ztargets.conf,v 1.34 1996/05/15 18:43:40 adam Exp $ # # This file contains the predefined targets in the WWW-Z39.50 gateway # Each target is an entry in the associative array "targets". The @@ -201,7 +201,7 @@ set targets(Tikal.dev.oclc.org/AGRICOLA) [list \ set targets(nwi.ub2.lu.se/sverige) { Sweden WAIS \ - { { Free-text {@attr 1=4} } } + { { {All Fields} {@attr 1=4} } } {} {Nordic Web Index - Sweden} 1 @@ -209,12 +209,16 @@ set targets(nwi.ub2.lu.se/sverige) { } -set targets(nwi.ub2.lu.se/new_nor_lib) { - Norway - WAIS - { { Free-text {@attr 1=4} } } +set targets(mars.dtv.dk:9999/Default) { + Denmark + USMARC + { { {All Fields} {@attr 1=1016 @attr 4=105} } + { {Title} {@attr 1=4 @attr 4=105} } + { {URL} {@attr gils 1=2021} } + { {Subject} {@attr 1=29 @attr 4=105} } + { {URL links} {@attr gils 1=2047} } } {} - {Nordic Web Index - Norway} + {Nordic Web Index - Denmark} 1 nwi } -- 1.7.10.4