From: Dobrica Pavlinusic Date: Sun, 21 May 2006 19:29:26 +0000 (+0000) Subject: transfer all input variables to open_db in input module X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=8f9a16ebf6ba5d5294c005ce6e171c37c0bf88f0;p=webpac2 transfer all input variables to open_db in input module git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@523 07558da8-63fa-0310-ba24-9fe276d99e06 --- diff --git a/conf/normalize/excel.pl b/conf/normalize/excel.pl index 99d9883..512b9e3 100755 --- a/conf/normalize/excel.pl +++ b/conf/normalize/excel.pl @@ -1,30 +1,26 @@ display('ISSN', - rec('A'), + rec('B'), ); search('ISN', - rec('A'), + rec('B'), ); tag('TitleProper', - rec('B') + rec('A') ); tag('Medium','[ Elektronièka graða ]' ); tag('fond', - rec('C') -); - -tag('PlacePublication', - rec('D') + rec('H') ); tag('NamePublisher', - rec('E'), + config('publisher'), ); tag('ElectronicLocation', - rec('F') + rec('E') ); diff --git a/lib/WebPAC/Input.pm b/lib/WebPAC/Input.pm index de649c0..298340d 100644 --- a/lib/WebPAC/Input.pm +++ b/lib/WebPAC/Input.pm @@ -227,6 +227,7 @@ sub open { my ($db, $size) = $self->{open_db}->( $self, path => $arg->{path}, filter => $filter_ref, + %{ $arg }, ); unless (defined($db)) { diff --git a/run.pl b/run.pl index e8c8c49..5cb8364 100755 --- a/run.pl +++ b/run.pl @@ -206,7 +206,9 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { my $input_module = $config->{webpac}->{inputs}->{$type}; - $log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module lookup '$input->{lookup}'"); + $log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", + $input->{lookup} ? "lookup '$input->{lookup}'" : "" + ); my $input_db = new WebPAC::Input( module => $input_module, @@ -222,6 +224,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { my $maxmfn = $input_db->open( path => $input->{path}, code_page => $input->{encoding}, # database encoding + %{ $input }, ); my $n = new WebPAC::Normalize::XML(