Improved filter.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 27 Feb 2001 10:10:40 +0000 (10:10 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 27 Feb 2001 10:10:40 +0000 (10:10 +0000)
test/cddb/cddb.abs
test/cddb/cddb.flt
test/cddb/cddb.tag
test/cddb/zebra.cfg

index 530ce9b..2829e4e 100644 (file)
@@ -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                -
index c617cc9..a643b21 100644 (file)
@@ -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
+               }
+       }               
+                       
        
 
index 00bb402..a94cb78 100644 (file)
@@ -3,3 +3,4 @@ type 4
 include meta.tag
 
 tag    100     track           string
+tag    101     ext             string
index 0cb190a..0cf9a05 100644 (file)
@@ -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