transfer all input variables to open_db in input module
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 May 2006 19:29:26 +0000 (19:29 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 May 2006 19:29:26 +0000 (19:29 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@523 07558da8-63fa-0310-ba24-9fe276d99e06

conf/normalize/excel.pl
lib/WebPAC/Input.pm
run.pl

index 99d9883..512b9e3 100755 (executable)
@@ -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')
 );
 
index de649c0..298340d 100644 (file)
@@ -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 (executable)
--- 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(