/[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 736 by dpavlin, Thu Oct 5 12:57:51 2006 UTC revision 738 by dpavlin, Thu Oct 5 14:46:38 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;  use WebPAC::Parser 0.07;
11  use WebPAC::Input 0.13;  use WebPAC::Input 0.13;
12  use WebPAC::Store 0.11;  use WebPAC::Store 0.11;
13  use WebPAC::Normalize 0.22;  use WebPAC::Normalize 0.22;
# Line 67  and subfield usage for each input Line 67  and subfield usage for each input
67    
68  turn on extra validation of imput records, see L<WebPAC::Validation>  turn on extra validation of imput records, see L<WebPAC::Validation>
69    
 =item --marc-normalize conf/normalize/mapping.pl  
   
 This option specifies normalisation file for MARC creation  
   
 =item --marc-output out/marc/test.marc  
   
 Optional path to output file  
   
70  =item --marc-lint  =item --marc-lint
71    
72  By default turned on if C<--marc-normalize> is used. You can disable lint  By default turned on if normalisation file has C<marc*> directives. You can disable lint
73  messages with C<--no-marc-lint>.  messages with C<--no-marc-lint>.
74    
75  =item --marc-dump  =item --marc-dump
# Line 110  my $debug = 0; Line 102  my $debug = 0;
102  my $only_filter;  my $only_filter;
103  my $stats = 0;  my $stats = 0;
104  my $validate_path;  my $validate_path;
 my ($marc_normalize, $marc_output);  
105  my $marc_lint = 1;  my $marc_lint = 1;
106  my $marc_dump = 0;  my $marc_dump = 0;
107  my $parallel = 0;  my $parallel = 0;
# Line 129  GetOptions( Line 120  GetOptions(
120          "debug+" => \$debug,          "debug+" => \$debug,
121          "stats" => \$stats,          "stats" => \$stats,
122          "validate=s" => \$validate_path,          "validate=s" => \$validate_path,
         "marc-normalize=s" => \$marc_normalize,  
         "marc-output=s" => \$marc_output,  
123          "marc-lint!" => \$marc_lint,          "marc-lint!" => \$marc_lint,
124          "marc-dump!" => \$marc_dump,          "marc-dump!" => \$marc_dump,
125          "parallel=i" => \$parallel,          "parallel=i" => \$parallel,
# Line 171  if ($stats) { Line 160  if ($stats) {
160          $log->info("using $use_indexer indexing engine...");          $log->info("using $use_indexer indexing engine...");
161  }  }
162    
 # disable indexing when creating marc  
 $use_indexer = undef if ($marc_normalize);  
   
163  # parse normalize files and create source files for lookup and normalization  # parse normalize files and create source files for lookup and normalization
164    
165  my $parser = new WebPAC::Parser( config => $config );  my $parser = new WebPAC::Parser( config => $config );
# Line 422  while (my ($database, $db_config) = each Line 408  while (my ($database, $db_config) = each
408                  }                  }
409    
410                  my $marc;                  my $marc;
411                  if ($marc_normalize) {                  if ($parser->generate_marc( $database, $input_name )) {
412                          $marc = new WebPAC::Output::MARC(                          $marc = new WebPAC::Output::MARC(
413                                  path => $marc_output || "out/marc/${database}-${input_name}.marc",                                  path => "out/marc/${database}-${input_name}.marc",
414                                  lint => $marc_lint,                                  lint => $marc_lint,
415                                  dump => $marc_dump,                                  dump => $marc_dump,
416                          );                          );

Legend:
Removed from v.736  
changed lines
  Added in v.738

  ViewVC Help
Powered by ViewVC 1.1.26