From: Dobrica Pavlinusic Date: Fri, 2 Mar 2007 00:32:21 +0000 (+0000) Subject: added --[no-]marc-generate X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=3f0539cc391d0e3beba98c379fa46e78a6216b48;p=webpac2 added --[no-]marc-generate git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@803 07558da8-63fa-0310-ba24-9fe276d99e06 --- diff --git a/run.pl b/run.pl index d6265c2..72ccca1 100755 --- a/run.pl +++ b/run.pl @@ -68,6 +68,11 @@ and subfield usage for each input turn on extra validation of imput records, see L +=item --marc-generate + +Generate MARC file. This will automatically be on if file contains C directives. +You can use this option as C<--no-marc-generate> to disable MARC generation. + =item --marc-lint By default turned on if normalisation file has C directives. You can disable lint @@ -103,6 +108,7 @@ my $debug = 0; my $only_filter; my $stats = 0; my $validate_path; +my $marc_generate = 1; my $marc_lint = 1; my $marc_dump = 0; my $parallel = 0; @@ -122,6 +128,7 @@ GetOptions( "debug+" => \$debug, "stats" => \$stats, "validate=s" => \$validate_path, + "marc-generate!" => \$marc_generate, "marc-lint!" => \$marc_lint, "marc-dump!" => \$marc_dump, "parallel=i" => \$parallel, @@ -431,7 +438,7 @@ while (my ($database, $db_config) = each %{ $config->databases }) { } my $marc; - if ($parser->have_rules( 'marc', $database, $input_name )) { + if ($marc_generate && $parser->have_rules( 'marc', $database, $input_name )) { $marc = new WebPAC::Output::MARC( path => "out/marc/${database}-${input_name}.marc", lint => $marc_lint,