/[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 814 by dpavlin, Sun Apr 1 21:47:48 2007 UTC revision 837 by dpavlin, Thu May 24 12:44:45 2007 UTC
# Line 12  use WebPAC::Input 0.16; Line 12  use WebPAC::Input 0.16;
12  use WebPAC::Store 0.14;  use WebPAC::Store 0.14;
13  use WebPAC::Normalize 0.22;  use WebPAC::Normalize 0.22;
14  use WebPAC::Output::TT;  use WebPAC::Output::TT;
15  use WebPAC::Validate 0.06;  use WebPAC::Validate 0.11;
16  use WebPAC::Output::MARC;  use WebPAC::Output::MARC;
17  use WebPAC::Config;  use WebPAC::Config;
18  use Getopt::Long;  use Getopt::Long;
# 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  ) if ($validate_path);          delimiters => $config->webpac('delimiters'),
177            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 560  while (my ($database, $db_config) = each Line 567  while (my ($database, $db_config) = each
567                                  $log->info("validation errors:\n$errors\n" );                                  $log->info("validation errors:\n$errors\n" );
568                                  print $report_fh "$errors\n" if ($report_fh);                                  print $report_fh "$errors\n" if ($report_fh);
569                          }                          }
570    
571                            print $report_fh "\nAll possible subfields/delimiter templates:\n", $validate->delimiters_templates( report => 1 ), "\n\n";
572                  }                  }
573    
574                  if ($stats) {                  if ($stats) {
# Line 600  if ($parallel) { Line 609  if ($parallel) {
609          $log->info("all parallel processes finished");          $log->info("all parallel processes finished");
610  }  }
611    
612    # save new delimiters if needed
613    $validate->save_delimiters_templates;
614    
615  #  #
616  # handle links or merge after indexing  # handle links or merge after indexing
617  #  #

Legend:
Removed from v.814  
changed lines
  Added in v.837

  ViewVC Help
Powered by ViewVC 1.1.26