From: Adam Dickmeiss Date: Tue, 27 Feb 2001 10:10:40 +0000 (+0000) Subject: Improved filter. X-Git-Tag: ZEBRA.1.1~19 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c0370114d3a568c1504bb68b57e182806c878a79;p=idzebra-moved-to-github.git Improved filter. --- diff --git a/test/cddb/cddb.abs b/test/cddb/cddb.abs index 530ce9b..2829e4e 100644 --- a/test/cddb/cddb.abs +++ b/test/cddb/cddb.abs @@ -1,4 +1,4 @@ -# $Id: cddb.abs,v 1.1 2001-02-27 09:50:18 adam Exp $ +# $Id: cddb.abs,v 1.2 2001-02-27 10:10:40 adam Exp $ name meta attset bib1.att @@ -11,6 +11,7 @@ esetname B meta-b.est maptab meta-usmarc.map elm (2,1) title Title:w,Title:p +elm (4,101) titleext Title-other-variant:w elm (2,2) creator Author:w,Author:p elm (2,21) subject Subject-heading elm (2,17) description - @@ -31,4 +32,5 @@ elm (1,10) rank - elm (1,14) localControlNumber Local-number elm (4,100) track - -elm (4,100)/(2,1) tracktitle - +elm (4,100)/(2,1) tracktitle Title-series:w,Title-series:p +elm (4,100)/(4,101) trackext - diff --git a/test/cddb/cddb.flt b/test/cddb/cddb.flt index c617cc9..a643b21 100644 --- a/test/cddb/cddb.flt +++ b/test/cddb/cddb.flt @@ -1,10 +1,22 @@ BEGIN { begin record cddb } /^DISCID=/ BODY /$/ { data -element identifier $1 } /^DTITLE=/ BODY /$/ { data -element title $1 } -/^TTITLE[0-9]+=/ BODY /$/ { - begin element track - data -element title $1 - end element +/^EXTD=/ BODY /$/ { data -element ext $1 } +/^TTITLE/ /[0-9]+/ /=/ BODY /$/ { set trackstitle($1) $3 } +/^EXTT/ /[0-9]+/ /=/ BODY /$/ { set tracksext($1) $3 } +/^PLAYORDER/ { + foreach v [array names trackstitle] { + begin element track + data -element title $trackstitle($v) + if {[info exists tracksext($v)]} { + set d $tracksext($v) + if {[string length $d]} { + data -element ext $tracksext($v) + } } + end element + } + } + diff --git a/test/cddb/cddb.tag b/test/cddb/cddb.tag index 00bb402..a94cb78 100644 --- a/test/cddb/cddb.tag +++ b/test/cddb/cddb.tag @@ -3,3 +3,4 @@ type 4 include meta.tag tag 100 track string +tag 101 ext string diff --git a/test/cddb/zebra.cfg b/test/cddb/zebra.cfg index 0cb190a..0cf9a05 100644 --- a/test/cddb/zebra.cfg +++ b/test/cddb/zebra.cfg @@ -1,5 +1,5 @@ # Simple Zebra configuration file -# $Id: zebra.cfg,v 1.1 2001-02-27 09:50:18 adam Exp $ +# $Id: zebra.cfg,v 1.2 2001-02-27 10:10:40 adam Exp $ # # Where the schema files, attribute files, etc are located. profilePath: .:../../tab:../../../yaz/tab @@ -9,7 +9,7 @@ attset: bib1.att attset: gils.att attset: explain.att -recordtype: grs.regx.cddb +recordtype: grs.tcl.cddb storekeys: 1 storedata: 1