/[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 834 by dpavlin, Thu May 24 10:53:48 2007 UTC revision 850 by dpavlin, Sun May 27 10:50:39 2007 UTC
# Line 68  and subfield usage for each input Line 68  and subfield usage for each input
68    
69  turn on extra validation of imput records, see L<WebPAC::Validation>  turn on extra validation of imput records, see L<WebPAC::Validation>
70    
71    =item --validate-delimiters path/to/validate_delimiters_file
72    
73    this option is used with C<--validate> to turn on extra validation of
74    delimiters. If file is non existant, it will be created on first run.
75    
76  =item --marc-generate  =item --marc-generate
77    
78  Generate MARC file. This will automatically be on if file contains C<marc*> directives.  Generate MARC file. This will automatically be on if file contains C<marc*> directives.
# Line 108  my $debug = 0; Line 113  my $debug = 0;
113  my $only_filter;  my $only_filter;
114  my $stats = 0;  my $stats = 0;
115  my $validate_path;  my $validate_path;
116    my $validate_delimiters_path;
117  my $marc_generate = 1;  my $marc_generate = 1;
118  my $marc_lint = 1;  my $marc_lint = 1;
119  my $marc_dump = 0;  my $marc_dump = 0;
# Line 128  GetOptions( Line 134  GetOptions(
134          "debug+" => \$debug,          "debug+" => \$debug,
135          "stats" => \$stats,          "stats" => \$stats,
136          "validate=s" => \$validate_path,          "validate=s" => \$validate_path,
137            "validate-delimiters=s" => \$validate_delimiters_path,
138          "marc-generate!" => \$marc_generate,          "marc-generate!" => \$marc_generate,
139          "marc-lint!" => \$marc_lint,          "marc-lint!" => \$marc_lint,
140          "marc-dump!" => \$marc_dump,          "marc-dump!" => \$marc_dump,
# Line 163  if ($merge) { Line 170  if ($merge) {
170          $log->info("created merge batch file $estcmd_path");          $log->info("created merge batch file $estcmd_path");
171  }  }
172    
   
173  my $validate;  my $validate;
174  $validate = new WebPAC::Validate(  $validate = new WebPAC::Validate(
175          path => $validate_path,          path => $validate_path,
176          delimiters => $config->webpac('delimiters'),          delimiters => $config->webpac('delimiters'),
177  ) if ($validate_path);          delimiters_path => $validate_delimiters_path,
178    ) if ($validate_path || $validate_delimiters_path);
179    
180  my $use_indexer = $config->use_indexer;  my $use_indexer = $config->use_indexer;
181  $stats ||= $validate;  $stats ||= $validate;
# Line 575  while (my ($database, $db_config) = each Line 581  while (my ($database, $db_config) = each
581                  $marc->finish if ($marc);                  $marc->finish if ($marc);
582    
583                  # close report                  # close report
584                  close($report_fh) if ($report_fh)                  close($report_fh) if ($report_fh);
585    
586                    # reset validate stats
587                    $validate->reset if ( $validate );
588          }          }
589    
590          eval { $indexer->finish } if ($indexer && $indexer->can('finish'));          eval { $indexer->finish } if ($indexer && $indexer->can('finish'));
# Line 603  if ($parallel) { Line 611  if ($parallel) {
611          $log->info("all parallel processes finished");          $log->info("all parallel processes finished");
612  }  }
613    
614    # save new delimiters if needed
615    $validate->save_delimiters_templates if ( $validate );
616    
617  #  #
618  # handle links or merge after indexing  # handle links or merge after indexing
619  #  #

Legend:
Removed from v.834  
changed lines
  Added in v.850

  ViewVC Help
Powered by ViewVC 1.1.26