/[webpac2]/trunk/run.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/run.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 684 by dpavlin, Sun Sep 24 15:53:54 2006 UTC revision 698 by dpavlin, Mon Sep 25 11:14:53 2006 UTC
# Line 7  use File::Temp qw/tempdir/; Line 7  use File::Temp qw/tempdir/;
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;
# Line 174  if ($stats) { Line 175  if ($stats) {
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    
# Line 309  while (my ($database, $db_config) = each Line 314  while (my ($database, $db_config) = each
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",
# Line 329  while (my ($database, $db_config) = each Line 326  while (my ($database, $db_config) = each
326                          delete($input->{modify_file});                          delete($input->{modify_file});
327                  }                  }
328    
329                    warn "depends on: ", dump( $parser->depends($database, $input->{name}), $parser->{depends}, $parser->lookup_create_rules($database, $input->{name}), $parser->{_lookup_create} );
330    
331                    my $lookup;
332    
333                  my $input_db = new WebPAC::Input(                  my $input_db = new WebPAC::Input(
334                          module => $input_module,                          module => $input_module,
335                          encoding => $config->webpac('webpac_encoding'),                          encoding => $config->webpac('webpac_encoding'),

Legend:
Removed from v.684  
changed lines
  Added in v.698

  ViewVC Help
Powered by ViewVC 1.1.26