added --[no-]marc-generate
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 2 Mar 2007 00:32:21 +0000 (00:32 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 2 Mar 2007 00:32:21 +0000 (00:32 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@803 07558da8-63fa-0310-ba24-9fe276d99e06

run.pl

diff --git a/run.pl b/run.pl
index d6265c2..72ccca1 100755 (executable)
--- 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<WebPAC::Validation>
 
+=item --marc-generate
+
+Generate MARC file. This will automatically be on if file contains C<marc*> 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<marc*> 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,