From: Adam Dickmeiss Date: Fri, 26 Jan 1996 15:50:06 +0000 (+0000) Subject: A lot of work on scan. Tables used to display scan terms and hits. X-Git-Url: http://git.indexdata.com/?p=egate.git;a=commitdiff_plain;h=cf6ead410b63297e714d9258f9ea593b1e127501 A lot of work on scan. Tables used to display scan terms and hits. Icon layout reorganized. Bug fixes. --- diff --git a/www/Makefile b/www/Makefile index ab73261..0fecbb5 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,7 +1,7 @@ # Makefile for www gateway utility # Europagate, 1995 # -# $Id: Makefile,v 1.26 1996/01/24 16:59:27 adam Exp $ +# $Id: Makefile,v 1.27 1996/01/26 15:50:06 adam Exp $ # SHELL=/bin/sh # @@ -58,7 +58,7 @@ $(TPROG2): $(P2) $(OLIB) $(TPROG3): $(P3) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ZLIB) -install: install.prog install.script +install: install.prog install.script install.gif install.prog: $(TPROG1) $(TPROG2) @for x in $(TPROG1) $(TPROG2); do \ @@ -88,6 +88,8 @@ install.script: echo Installing $$x; \ cp $$x $(EGWDIR); \ done + +install.gif: @if [ ! -d $(GIFDIR) ]; then \ echo "Making directory $(GIFDIR)"; \ mkdir $(GIFDIR); \ diff --git a/www/history.egw b/www/history.egw index f3d0bdf..90ce2ce 100644 --- a/www/history.egw +++ b/www/history.egw @@ -4,27 +4,21 @@ { -# $Id: history.egw,v 1.4 1996/01/24 08:27:25 adam Exp $ +# $Id: history.egw,v 1.5 1996/01/26 15:50:06 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl } + set useIcons 1 + button-europagate + button-new-target 0 + z39history - if {$useIcons} { - html {Europagate} - } else { - html {Europagate | } - } - html {} - } else { - html {">New Target} "\n" - } + set useIcons 0 + button-europagate + button-new-target 0 } { catch maintenance diff --git a/www/mquery.egw b/www/mquery.egw index 4fc8f45..af33dda 100644 --- a/www/mquery.egw +++ b/www/mquery.egw @@ -4,7 +4,7 @@ { -# $Id: mquery.egw,v 1.10 1996/01/24 08:27:25 adam Exp $ +# $Id: mquery.egw,v 1.11 1996/01/26 15:50:07 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -20,6 +20,10 @@ set setNo 1 } + set useIcons 1 + button-europagate + button-new-target 0 + html {
} \n @@ -36,14 +40,23 @@ } lappend hist($setNo,$i,database) $base } + set oSetNo [lindex $sessionParms 0] + if {$i == 0 && $oSetNo != ""} { + for {set i 1} {$i <= $hist($oSetNo,0,host)} {incr i} { + set hist($setNo,$i,host) $hist($oSetNo,$i,host) + set hist($setNo,$i,idAuthentication) \ + $hist($oSetNo,$i,idAuthentication) + set hist($setNo,$i,database) $hist($oSetNo,$i,database) + } + incr i -1 + } if {$i == 0} { html "

No targets specified

" egw_abort 1 } set hist($setNo,0,host) $i -} -

Input your search criteria:


-{ + + html "Input your search criteria:
\n" set fields [lindex $targets($host) 2] for {set no 1} {$no < 4} {incr no} { html { -
-{ + html {} + html "
\n" html {Number of records to display in the result set list: } html {} -} -
-{ - global useIcons - if {$useIcons} { - html {} - } - html {} - } else { - html {"> New target } - } + html {" size=3>} + + set useIcons 0 + button-europagate + button-new-target 0 } { catch maintenance diff --git a/www/msearch.egw b/www/msearch.egw index 08f5ea6..2ca5eb5 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,6 +1,6 @@ { -# $Id: msearch.egw,v 1.12 1996/01/24 08:27:26 adam Exp $ +# $Id: msearch.egw,v 1.13 1996/01/26 15:50:07 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -13,6 +13,7 @@ html " WWW/Z39.50 Gateway Search \n" html "\n" + set setNo [lindex $sessionParms 0] if {[egw_form menu1] != ""} { @@ -34,6 +35,13 @@ set hist($setNo,maxPresent) 30 } } + + set useIcons 1 + button-europagate + button-new-query 1 $setNo + button-new-target 0 + + html "
\n" z39msearch $setNo 1 B html "
\n" @@ -58,28 +66,11 @@ html "\n" } html "
\n" -} -{ - global useIcons - - if {$useIcons} { - html {} - } - html {} - } else { - html {"> New target } " | \n" - } - html {} - } else { - html {"> New query } - } + set useIcons 0 + button-europagate + button-new-query 1 $setNo + button-new-target 0 } { diff --git a/www/mtargets.egw b/www/mtargets.egw index ca6b893..1d5dc32 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,11 +1,12 @@ { -# $Id: mtargets.egw,v 1.11 1996/01/12 16:30:10 adam Exp $ +# $Id: mtargets.egw,v 1.12 1996/01/26 15:50:07 adam Exp $ set setNo 1 source ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl } + set mMode 1 } Europagate, WWW/Z39.50 Gateway @@ -27,12 +28,12 @@ set useIcons 1 } } -} -
-EUROPAGATE -
-

Choose one or more Z39.50 targets

-{ + + set useIcons 1 + button-europagate + button-define-target 0 + + html "

Choose one or more targets

\n" html {

} \n html "
\n" @@ -52,9 +53,14 @@ html "
\n" } html "
\n" + html {
} \n + + html "

\n" + set useIcons 0 + button-europagate + button-define-target 0 } - - + { catch maintenance if {!$debug} return diff --git a/www/query.egw b/www/query.egw index 632f35e..f68a696 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.31 1996/01/24 16:59:28 adam Exp $ +# $Id: query.egw,v 1.32 1996/01/26 15:50:08 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -44,7 +44,6 @@ proc ok-response {} { ir z39 } - html "

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


\n" z39 callback ok-response z39 failback fail-response set thisHost [splitHostSpec $host] @@ -96,6 +95,19 @@ proc ok-response {} { egw_abort } } + + set useIcons 1 + button-europagate + button-new-target 1 + if {[lsearch [z39 options] scan] >= 0} { + button-scan-window 1 $setNo + } + button-view-history 0 + + html "

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


\n" + + html [lindex $targets($host) 4] "
\n" + set databases [lindex $targets($host) 1] if {$initSet == ""} { @@ -192,15 +204,12 @@ proc ok-response {} { html 20 } html {" size=4>} -} - -

+ html "\n" + html "

\n" -{ + set useIcons 0 button-europagate - button-new-target 1 - if {[lsearch [z39 options] scan] >= 0} { button-scan-window 1 $setNo } @@ -228,5 +237,3 @@ proc ok-response {} { html "scanTerm: " $scanTerm "
\n" } - - diff --git a/www/search.egw b/www/search.egw index 588f13a..eed24c0 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.30 1996/01/24 08:27:29 adam Exp $ +# $Id: search.egw,v 1.31 1996/01/26 15:50:08 adam Exp $ proc start-scan {scanNo cache dir initSet} { global sessionId @@ -16,9 +16,50 @@ proc start-scan {scanNo cache dir initSet} { set host $hist($setNo,host) - html " WWW/Z39.50 Gateway Scan " $host " \n" + html " WWW/Z39.50 Gateway Scan " [splitHostSpec $host] + html " \n" html "\n" + set useIcons 1 + button-europagate + + if {$dir == "b"} { + set lines 20 + set pos 20 + } elseif {$dir == "f"} { + set lines 20 + set pos 1 + } else { + set lines 20 + set pos 10 + } + if {$hist($setNo,$scanNo,scanTerm) != ""} { + if {[z39scan $setNo $scanNo 0 $lines $pos $cache] != "1"} { + button-new-query 0 $setNo + egw_log debug "z39_scan failed" + return + } + html {} + if {$useIcons} { + html {} + } else { + html {Previous Terms | } + } + + html {} + if {$useIcons} { + html {} + } else { + html {Next Terms | } + } + html {} + } + button-new-query 0 $setNo + set databases [lindex $targets($host) 1] if {$initSet == ""} { @@ -50,14 +91,15 @@ proc start-scan {scanNo cache dir initSet} { html { All
} \n } - html "Input your search criteria:
\n" } + html "Input your scan criteria:
\n" set fields [lindex $targets($host) 2] set no 1 html {} html {} html "\n
\n" -} -{ + set useIcons 0 button-europagate button-new-target 0 } diff --git a/www/z39util.tcl b/www/z39util.tcl index 7903fd4..6860b16 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.25 1996/01/24 16:59:29 adam Exp $ +# $Id: z39util.tcl,v 1.26 1996/01/26 15:50:11 adam Exp $ # proc saveState {} { uplevel #0 { @@ -105,6 +105,8 @@ proc display-brief {zset no tno} { set publisher [$zset getMarc $no field 260 * b] set year [$zset getMarc $no field 260 * c] } ] } { + html { } set p 0 foreach a $author { if {$p} { @@ -130,32 +132,20 @@ proc display-brief {zset no tno} { if {$p} { html ": " } - html { } set nope 1 foreach v $title { html $v set nope 0 } if {$nope} { - html {No title} - } - html { } - foreach v $cover { - html $v - } - if {0} { - html {
} - foreach v $location { - html " $v" - } - foreach v $publisher { - html " $v" - } - foreach v $year { - html " $v" + set v [join $cover ""] + if {[string length $v] > 40} { + html [string range $v 0 38] "..." + } else { + html $v } - } + } + html { } } html "
\n" } @@ -561,6 +551,7 @@ proc z39scan {setNo scanNo tno scanLines scanPos cache} { $zz callback [list scan-response $zs] + egw_log debug "scan: ${scanAttr} ${scanTerm}" set sessionWait 0 $zs scan "${scanAttr} ${scanTerm}" @@ -610,16 +601,31 @@ proc display-scan {setNo scanNo tno} { set hist($setNo,[expr $scanNo + 1],scanTerm) $t } } + html {} + html {} \n + for {set i 0} {$i < $m} {incr i} { - regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm - html {} + html {} \n } + html { 0} { html " " [join $op " "] " " - html $hist($setNo,form,menu$i) "=" $hist($setNo,form,entry$i) + html [join $hist($setNo,form,menu$i)] "=" + html $hist($setNo,form,entry$i) set op $hist($setNo,form,logic$i) } } @@ -1012,9 +1019,9 @@ proc button-define-target {more} { html / $sessionId {/tform.egw} if {$useIcons} { html {">} + html {alt="Define Target" border=0>} } else { - html {">New Target} + html {">Define Target} if {$more} { html " | \n" } else { @@ -1027,9 +1034,15 @@ proc button-new-target {more} { global useIcons global env global sessionId + global mMode html {} @@ -1070,9 +1083,16 @@ proc button-new-query {more setNo} { global env global sessionId global hist + global mMode html {} + html / $sessionId + if {$mMode} { + html {/mquery.egw/} $setNo + } else { + html {/query.egw/} $hist($setNo,host) + $setNo + } + html {">} if {$useIcons} { html {} @@ -1110,7 +1130,7 @@ proc button-scan-window {more setNo} { proc maintenance {} { html {
This page is maintained by } html { Peter Wad Hansen .} - html {Last modified 24. january 1996.
} + html {Last modified 26. january 1996.
} html { This and the following pages are under construction and } html {will continue to be so until the end of January 1996.} } diff --git a/www/ztargets.conf b/www/ztargets.conf index 41b3b7f..312492f 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.19 1996/01/24 16:59:29 adam Exp $ +# $Id: ztargets.conf,v 1.20 1996/01/26 15:50:12 adam Exp $ set commonFields { { Title {@attr 1=4} } { Author {@attr 1=1} } @@ -18,16 +18,25 @@ set targets(myriad.middlebury.edu.MIDCAT) { { All {@attr 1=1016} } } {} - {Myriad} + {Middlebury College (DRA).} 1 } -set targets(rlg.stanford.edu.BKS-AMC-MAP-MDF-REC-SCO-SER-VIM-BIB) [list \ - rlg \ - {BKS AMC MAP MDF REC SCO SER VIM BIB} \ +set targets(rlg.stanford.edu.BKS-AMC-MAP-MDF-REC-SCO-SER-VIM) [list \ + RLG \ + {BKS AMC MAP MDF REC SCO SER VIM} \ $commonFields \ {} \ - {Research Libraries group, Stanford University} \ + {Research Libraries group, Stanford University. Databases:
+ AMC:Archival and manuscripts control; + BKS:Books; + MAP:Maps; + MDF:Computer files; + REC:Recordings; + SCO:Musical scores; + SER:Serials/periodicals; + VIM:Visual materials (films, videos, images) + } \ 1 ] @@ -36,7 +45,7 @@ set targets(z3950.bibsys.no:2100.BIBSYS) [list \ BIBSYS \ $commonFields \ {} \ - {BIBSYS - Norway} \ + {BIBSYS; Norway.} \ 0 \ ] @@ -45,7 +54,7 @@ set targets(dtbsun.dtv.dk:4501.DEM) [list \ DEM \ $commonFields \ {} \ - {Aleph, Z39.50 Server on DTV} \ + {Aleph Test server at DTV} \ 0 \ ] @@ -83,12 +92,12 @@ set targets(dtbsun.dtv.dk:9999.usgs-esdd-cd_rom-uah-www_dk) { 1 } -set targets(z3950.research.att.com.Default) [list \ +set targets(z3950.research.att.com.books) [list \ {AT&T Server} \ - Default \ + books \ $commonFields \ {} \ - {Z39.50 Server at AT&T} \ + {AT&T book catalog, mainly IEEE} \ 1 \ ] @@ -100,3 +109,13 @@ set targets(dranet.dra.com.drewdb) [list \ {Data Research Z39.50 Server} \ 1 \ ] + +set targets(localhost:210.Default) [list \ + {Test} \ + Default \ + $commonFields \ + {} \ + {Server for testing purposes only.} \ + 1 \ +] +
Scan term} + html {Hits} + html {
} + if {0} { + regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm + html {} + } else { + regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm + html {} + } html [lindex [$zs scanLine $i] 1] - html {: } + html {} + html {} html [lindex [$zs scanLine $i] 2] - html "
\n" + html {