my @formats = qw/USMARC UNIMARC XML BRE ARE/;
-my ($config,$format,$encoding,$location,$dollarsign,$idl,$help,$holdings,$timeout,$export_mfhd,$type,$all_records) = ('/openils/conf/opensrf_core.xml','USMARC','MARC8','','$',0,undef,undef,0,undef,'biblio',undef);
+my ($config,$format,$encoding,$location,$dollarsign,$idl,$help,$holdings,$timeout,$export_mfhd,$type,$all_records,$quiet) = ('/openils/conf/opensrf_core.xml','USMARC','MARC8','','$',0,undef,undef,0,undef,'biblio',undef,0);
my ($exclusion_ini,$collapse_to_depth, $output_file);
my $cfg;
my $force901;
'collapse_to_depth=i' => \$collapse_to_depth,
'onlyholdings' => \$onlyholdings,
'output-file=s' => \$output_file,
+ 'quiet' => \$quiet,
);
if ($exclusion_ini) {
if ($format eq 'ARE' or $format eq 'BRE') {
print $outfh OpenSRF::Utils::JSON->perl2JSON($bib);
- stats();
+ stats() unless $quiet;
$count{did}++;
return;
}
}
}
- stats() if (! ($count{bib} % 50 ));
+ stats() if (!$quiet && ! ($count{bib} % 50 ));
}
sub stats {
- stats() if (! ($count{cp} % 100 ));
+ stats() if (!$quiet && ! ($count{cp} % 100 ));
} # COPYMAP: for my $cp ( @$cn_map_list )
} # for my $cn ( @$cn_list )
} # if ($cp_list && @$cp_list)
my $note = shift;
my $outf = *STDERR;
$outf = *STDOUT if($output_file) ;
- printf($outf "Skipped %s due to config: %s\n",$id,$note);
+ printf($outf "Skipped %s due to config: %s\n",$id,$note) unless $quiet;
}