/[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 978 by dpavlin, Sat Nov 3 12:35:42 2007 UTC revision 1075 by dpavlin, Wed Nov 28 11:14:44 2007 UTC
# Line 153  pod2usage(-verbose => 2) if ($help); Line 153  pod2usage(-verbose => 2) if ($help);
153    
154  my $config = new WebPAC::Config( path => $config_path );  my $config = new WebPAC::Config( path => $config_path );
155    
156    WebPAC::Normalize::_debug( $debug - 1 ) if $debug > 1;
157    
158  #print "config = ",dump($config) if ($debug);  #print "config = ",dump($config) if ($debug);
159    
160  die "no databases in config file!\n" unless ($config->databases);  die "no databases in config file!\n" unless ($config->databases);
# Line 329  foreach my $database ( sort keys %{ $con Line 331  foreach my $database ( sort keys %{ $con
331    
332                  $log->debug("calling $module->new(",dump( $output ),")");                  $log->debug("calling $module->new(",dump( $output ),")");
333                  my $out = new $module->new( $output );                  my $out = new $module->new( $output );
334                  $out->init;                  if ( $out->init ) {
335                            push @output_modules, $out;
336                  push @output_modules, $out;                  } else {
337                            $log->warn("SKIPPED $module");
338                    }
339          }          }
340    
341    
# Line 365  foreach my $database ( sort keys %{ $con Line 369  foreach my $database ( sort keys %{ $con
369    
370                  my @lookups = $parser->have_lookup_create($database, $input);                  my @lookups = $parser->have_lookup_create($database, $input);
371    
372                  $log->info("working on input '$input_name' in $input->{path} [type: $input->{type}] using $input_module",                  $log->info("working on $database/$input_name with $input_module on $input->{path}",
373                          @lookups ? " creating lookups: ".join(", ", @lookups) : ""                          @lookups ? " creating lookups: ".join(", ", @lookups) : ""
374                  );                  );
375    
# Line 600  foreach my $database ( sort keys %{ $con Line 604  foreach my $database ( sort keys %{ $con
604                          if ($marc) {                          if ($marc) {
605                                  my $i = 0;                                  my $i = 0;
606    
607                                  while (my $fields = WebPAC::Normalize::_get_marc_fields( fetch_next => 1 ) ) {                                  while (my $fields = WebPAC::Normalize::MARC::_get_marc_fields( fetch_next => 1 ) ) {
608                                          $marc->add(                                          $marc->add(
609                                                  id => $mfn . ( $i ? "/$i" : '' ),                                                  id => $mfn . ( $i ? "/$i" : '' ),
610                                                  fields => $fields,                                                  fields => $fields,
611                                                  leader => WebPAC::Normalize::_get_marc_leader(),                                                  leader => WebPAC::Normalize::MARC::_get_marc_leader(),
612                                                  row => $row,                                                  row => $row,
613                                          );                                          );
614                                          $i++;                                          $i++;

Legend:
Removed from v.978  
changed lines
  Added in v.1075

  ViewVC Help
Powered by ViewVC 1.1.26