Revert "Bug 37478: Rename strict to skip_bad_records and add POD"

This reverts commit b3dd152c5e.
This commit is contained in:
Alex Buckley 2024-12-27 09:29:33 +13:00
parent e12fa4769c
commit 021257fe2e
1 changed files with 37 additions and 43 deletions

View File

@ -77,45 +77,45 @@ my $localcust;
my $marc_mod_template = '';
my $marc_mod_template_id = -1;
my $skip_indexing = 0;
my $skip_bad_records;
my $strict_mode;
$| = 1;
GetOptions(
'commit:f' => \$commit,
'file:s' => \$input_marc_file,
'n:f' => \$number,
'o|offset:f' => \$offset,
'h|help' => \$version,
'd|delete' => \$delete,
't|test' => \$test_parameter,
's' => \$skip_marc8_conversion,
'c:s' => \$char_encoding,
'v|verbose:+' => \$verbose,
'fk' => \$fk_off,
'm:s' => \$format,
'l:s' => \$logfile,
'append' => \$append,
'k|keepids:s' => \$keepids,
'b|biblios' => \$biblios,
'a|authorities' => \$authorities,
'authtypes:s' => \$authtypes,
'filter=s@' => \$filters,
'insert' => \$insert,
'update' => \$update,
'all' => \$all,
'match=s@' => \$match,
'i|isbn' => \$isbn_check,
'x:s' => \$sourcetag,
'y:s' => \$sourcesubfield,
'idmap:s' => \$idmapfl,
'cleanisbn!' => \$cleanisbn,
'yaml:s' => \$yamlfile,
'dedupbarcode' => \$dedup_barcode,
'framework=s' => \$framework,
'custom:s' => \$localcust,
'marcmodtemplate:s' => \$marc_mod_template,
'si|skip_indexing' => \$skip_indexing,
'sk|skip_bad_records' => \$skip_bad_records,
'commit:f' => \$commit,
'file:s' => \$input_marc_file,
'n:f' => \$number,
'o|offset:f' => \$offset,
'h|help' => \$version,
'd|delete' => \$delete,
't|test' => \$test_parameter,
's' => \$skip_marc8_conversion,
'c:s' => \$char_encoding,
'v|verbose:+' => \$verbose,
'fk' => \$fk_off,
'm:s' => \$format,
'l:s' => \$logfile,
'append' => \$append,
'k|keepids:s' => \$keepids,
'b|biblios' => \$biblios,
'a|authorities' => \$authorities,
'authtypes:s' => \$authtypes,
'filter=s@' => \$filters,
'insert' => \$insert,
'update' => \$update,
'all' => \$all,
'match=s@' => \$match,
'i|isbn' => \$isbn_check,
'x:s' => \$sourcetag,
'y:s' => \$sourcesubfield,
'idmap:s' => \$idmapfl,
'cleanisbn!' => \$cleanisbn,
'yaml:s' => \$yamlfile,
'dedupbarcode' => \$dedup_barcode,
'framework=s' => \$framework,
'custom:s' => \$localcust,
'marcmodtemplate:s' => \$marc_mod_template,
'si|skip_indexing' => \$skip_indexing,
'st|strict' => \$strict_mode,
);
$biblios ||= !$authorities;
@ -343,7 +343,7 @@ RECORD: while () {
}
if ($record) {
if ($skip_bad_records) {
if ($strict_mode) {
my $xml = $record->as_xml_record();
eval { MARC::Record::new_from_xml( $xml, 'UTF-8', "MARC21" ); };
if ($@) {
@ -1046,12 +1046,6 @@ If set, do not index the imported records with Zebra or Elasticsearch.
Use this when you plan to do a complete reindex of your data after running
bulkmarciport. This can increase performance and avoid unnecessary load.
=item B<-sk, --skip_bad_records>
If set, check the validity of records before adding. If they are invalid we will
print the output of MARC::Lint->check_record and skip them during the import. Without
this option bad records may kill the job.
=back
=cut