--- trunk/run.pl 2006/09/24 15:53:54 684 +++ trunk/run.pl 2006/09/25 11:14:53 698 @@ -7,6 +7,7 @@ use lib './lib'; use WebPAC::Common 0.02; +use WebPAC::Parser 0.04; use WebPAC::Lookup 0.03; use WebPAC::Input 0.11; use WebPAC::Store 0.03; @@ -174,6 +175,10 @@ # disable indexing when creating marc $use_indexer = undef if ($marc_normalize); +# parse normalize files and create source files for lookup and normalization + +my $parser = new WebPAC::Parser( config => $config ); + my $total_rows = 0; my $start_t = time(); @@ -309,14 +314,6 @@ die "I know only how to handle input types ", join(",", $config->webpac('inputs') ), " not '$type'!\n" unless (grep(/$type/, $config->webpac('inputs'))); - my $lookup; - if ($input->{lookup}) { - $lookup = new WebPAC::Lookup( - lookup_file => $input->{lookup}, - ); - delete( $input->{lookup} ); - } - my $input_module = $config->webpac('inputs')->{$type}; $log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", @@ -329,6 +326,10 @@ delete($input->{modify_file}); } + warn "depends on: ", dump( $parser->depends($database, $input->{name}), $parser->{depends}, $parser->lookup_create_rules($database, $input->{name}), $parser->{_lookup_create} ); + + my $lookup; + my $input_db = new WebPAC::Input( module => $input_module, encoding => $config->webpac('webpac_encoding'),