r1674@llin: dpavlin | 2007-11-28 00:54:47 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Nov 2007 23:54:45 +0000 (23:54 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Nov 2007 23:54:45 +0000 (23:54 +0000)
 - final tweaks to WebPAC::Output::Excel
 - version bump [2.34]

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

Makefile.PL
TODO
conf/llin.yml
conf/log.conf
lib/WebPAC/Output/Excel.pm

index ae09ada..2589ce7 100644 (file)
@@ -5,7 +5,7 @@ use inc::Module::Install;
 
 
 name   'WebPAC';
-version        '2.34_1';
+version        '2.34';
 license        'GPL';
 
 requires       'YAML';
diff --git a/TODO b/TODO
index 9ed6939..ba22b40 100644 (file)
--- a/TODO
+++ b/TODO
@@ -50,7 +50,7 @@
 + validator don't accept 0 as valid subfield
 + subroutines gets mungled in normalization files [2.33]
 + fix marc_template hadling of field value 0
-- csv/excel output conf/normalize/csv_ff-peri.pl
++ csv/excel output conf/normalize/csv_ff-peri.pl [2.34]
 - rewrite WebPAC::Input to be based on Module::Pluggable
 - check usage of config in normalize file (database, input name?)
 - load_ds/save_ds should use on-disk hash to preserve inodes
index 1429de7..6184fee 100644 (file)
@@ -411,7 +411,7 @@ databases:
         path: '/data/isis_data/ffps-peri/PERI'
 #        encoding: 'cp852'
         normalize:
-          path: 'conf/normalize/common.pl'
+          path: 'conf/normalize/csv_ff-peri.pl'
     output:
       - module: 'Excel'
         path: 'out/peri.xls'
index 0237883..b171d49 100644 (file)
@@ -54,7 +54,7 @@ log4perl.logger.WebPAC.Input.PDF=DEBUG
 #log4perl.logger.WebPAC.Output.KinoSearch=DEBUG
 #log4perl.logger.WebPAC.Output.Webpacus=DEBUG
 log4perl.logger.WebPAC.Output.Jifty=DEBUG
-log4perl.logger.WebPAC.Output.Excel=DEBUG
+#log4perl.logger.WebPAC.Output.Excel=DEBUG
 
 #log4perl.logger.WebPAC.Search.Estraier=DEBUG
 
index d422746..b0d6ec0 100644 (file)
@@ -106,7 +106,7 @@ sub add {
 
        my $cols = 0;
 
-       my $hash = $self->ds_to_hash( $ds, $self->filter, disable_key_mungle => 1 );
+       my $hash = $self->ds_to_hash( $ds, $self->filter, disable_key_mungle => 1, single_values => 1 );
        $log->debug("hash from ",$self->filter," = ", sub { dump( $hash ) });
 
        my $worksheet = $self->worksheet || $log->logconfess("no worksheet?");
@@ -134,9 +134,14 @@ sub finish {
 
        my $log = $self->_get_logger();
 
+       my $path = $self->path;
+
        $self->workbook->close() ||
-               $log->logdie("can't close Excel file ", $self->path, ": $!");
+               $log->logdie("can't close Excel file $path: $!");
+
+       $log->info("created $path ", -s $path, " bytes with ", $self->line, " rows");
 
+       return $self->line;
 }
 
 =head1 AUTHOR