r11789@llin: dpavlin | 2005-12-19 06:29:24 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Dec 2005 23:34:24 +0000 (23:34 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Dec 2005 23:34:24 +0000 (23:34 +0000)
 final tweaks, version bumping [2.00_6]

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@291 07558da8-63fa-0310-ba24-9fe276d99e06

TODO
conf/log.conf
lib/WebPAC.pm
lib/WebPAC/Input/MARC.pm
lib/WebPAC/Output/Estraier.pm
run.pl

diff --git a/TODO b/TODO
index d4928b3..eebff70 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,7 +5,7 @@
 + create links to other databases [2.00_4]
 + add regexp filter [2.00_5]
 + add YAML as normalize format
-- add more input formats (MARC::Fast and others)
++ add more input formats (MARC::Fast and others) [2.00_6]
 - delete unused files in database directories
 - scoring for various fields in input/*.xml
 - write pure perl Search::HyperEstraier
index 4842d4a..f03e0cc 100644 (file)
@@ -6,8 +6,8 @@ log4perl.rootLogger=INFO, LOG, SCREEN
 #, SCREEN
 
 # you can specify methods from WebPAC here also!
-#log4perl.logger.main=INFO
-log4perl.logger.main=DEBUG
+log4perl.logger.main=INFO
+#log4perl.logger.main=DEBUG
 
 #log4perl.logger.WebPAC=DEBUG
 
index 09f32e6..7d41146 100644 (file)
@@ -13,7 +13,7 @@ Version 2.00
 
 =cut
 
-our $VERSION = '2.00_5';
+our $VERSION = '2.00_6';
 
 =head1 SYNOPSIS
 
index 2786018..79358fa 100644 (file)
@@ -77,7 +77,7 @@ sub fetch_rec {
                $self->_get_logger()->warn("seek beyond database size $self->{size} to $mfn");
        } else {
                my $row = $db->fetch($mfn);
-               $row->{'000'}->[0] = $mfn;
+               push @{$row->{'000'}}, $mfn;
                return $row;
        }
 }
index 98848f3..5ca1b90 100644 (file)
@@ -17,11 +17,11 @@ WebPAC::Output::Estraier - Create Hyper Estraier full text index
 
 =head1 VERSION
 
-Version 0.06
+Version 0.07
 
 =cut
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 =head1 SYNOPSIS
 
diff --git a/run.pl b/run.pl
index 1bf4b80..f69d51f 100755 (executable)
--- a/run.pl
+++ b/run.pl
@@ -129,18 +129,18 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
 
                        my $row = $input_db->fetch || next;
 
-                       my $mfn = $row->{000}->[0] || $row->{000} || die "can't find MFN";
+                       my $mfn = $row->{'000'}->[0];
 
-                       if ($mfn =~ m#^\d+$#) {
+                       if (! $mfn || $mfn !~ m#^\d+$#) {
                                $log->warn("record $pos doesn't have valid MFN but '$mfn', using $pos");
                                $mfn = $pos;
-                               $row->{000}->[0] = $pos;
+                               push @{ $row->{'000'} }, $pos;
                        }
 
                        my $ds = $n->data_structure($row);
 
                        $est->add(
-                               id => $input->{name} . "#" . $mfn,
+                               id => $input->{name} . "/" . $mfn,
                                ds => $ds,
                                type => $config->{hyperestraier}->{type},
                        );