7 |
use lib './lib'; |
use lib './lib'; |
8 |
|
|
9 |
use WebPAC::Common 0.02; |
use WebPAC::Common 0.02; |
10 |
|
use WebPAC::Parser 0.04; |
11 |
use WebPAC::Lookup 0.03; |
use WebPAC::Lookup 0.03; |
12 |
use WebPAC::Input 0.11; |
use WebPAC::Input 0.11; |
13 |
use WebPAC::Store 0.03; |
use WebPAC::Store 0.03; |
175 |
# disable indexing when creating marc |
# disable indexing when creating marc |
176 |
$use_indexer = undef if ($marc_normalize); |
$use_indexer = undef if ($marc_normalize); |
177 |
|
|
178 |
|
# parse normalize files and create source files for lookup and normalization |
179 |
|
|
180 |
|
my $parser = new WebPAC::Parser( config => $config ); |
181 |
|
|
182 |
my $total_rows = 0; |
my $total_rows = 0; |
183 |
my $start_t = time(); |
my $start_t = time(); |
184 |
|
|
314 |
|
|
315 |
die "I know only how to handle input types ", join(",", $config->webpac('inputs') ), " not '$type'!\n" unless (grep(/$type/, $config->webpac('inputs'))); |
die "I know only how to handle input types ", join(",", $config->webpac('inputs') ), " not '$type'!\n" unless (grep(/$type/, $config->webpac('inputs'))); |
316 |
|
|
|
my $lookup; |
|
|
if ($input->{lookup}) { |
|
|
$lookup = new WebPAC::Lookup( |
|
|
lookup_file => $input->{lookup}, |
|
|
); |
|
|
delete( $input->{lookup} ); |
|
|
} |
|
|
|
|
317 |
my $input_module = $config->webpac('inputs')->{$type}; |
my $input_module = $config->webpac('inputs')->{$type}; |
318 |
|
|
319 |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", |
326 |
delete($input->{modify_file}); |
delete($input->{modify_file}); |
327 |
} |
} |
328 |
|
|
329 |
|
warn "parser->depends = ", dump( $parser->{depends} ); |
330 |
|
warn "depends on: ", dump( $parser->depends($database, $input->{name}) ); |
331 |
|
warn "lookup_create_rules = ", dump( $parser->lookup_create_rules($database, $input->{name}) ); |
332 |
|
warn "parser->_lookup_create = ", dump( $parser->{_lookup_create} ); |
333 |
|
|
334 |
|
my $lookup; |
335 |
|
|
336 |
my $input_db = new WebPAC::Input( |
my $input_db = new WebPAC::Input( |
337 |
module => $input_module, |
module => $input_module, |
338 |
encoding => $config->webpac('webpac_encoding'), |
encoding => $config->webpac('webpac_encoding'), |