|
Lines 77-121
my $localcust;
Link Here
|
| 77 |
my $marc_mod_template = ''; |
77 |
my $marc_mod_template = ''; |
| 78 |
my $marc_mod_template_id = -1; |
78 |
my $marc_mod_template_id = -1; |
| 79 |
my $skip_indexing = 0; |
79 |
my $skip_indexing = 0; |
| 80 |
my $strict_mode; |
80 |
my $skip_bad_records; |
| 81 |
$| = 1; |
81 |
$| = 1; |
| 82 |
|
82 |
|
| 83 |
GetOptions( |
83 |
GetOptions( |
| 84 |
'commit:f' => \$commit, |
84 |
'commit:f' => \$commit, |
| 85 |
'file:s' => \$input_marc_file, |
85 |
'file:s' => \$input_marc_file, |
| 86 |
'n:f' => \$number, |
86 |
'n:f' => \$number, |
| 87 |
'o|offset:f' => \$offset, |
87 |
'o|offset:f' => \$offset, |
| 88 |
'h|help' => \$version, |
88 |
'h|help' => \$version, |
| 89 |
'd|delete' => \$delete, |
89 |
'd|delete' => \$delete, |
| 90 |
't|test' => \$test_parameter, |
90 |
't|test' => \$test_parameter, |
| 91 |
's' => \$skip_marc8_conversion, |
91 |
's' => \$skip_marc8_conversion, |
| 92 |
'c:s' => \$char_encoding, |
92 |
'c:s' => \$char_encoding, |
| 93 |
'v|verbose:+' => \$verbose, |
93 |
'v|verbose:+' => \$verbose, |
| 94 |
'fk' => \$fk_off, |
94 |
'fk' => \$fk_off, |
| 95 |
'm:s' => \$format, |
95 |
'm:s' => \$format, |
| 96 |
'l:s' => \$logfile, |
96 |
'l:s' => \$logfile, |
| 97 |
'append' => \$append, |
97 |
'append' => \$append, |
| 98 |
'k|keepids:s' => \$keepids, |
98 |
'k|keepids:s' => \$keepids, |
| 99 |
'b|biblios' => \$biblios, |
99 |
'b|biblios' => \$biblios, |
| 100 |
'a|authorities' => \$authorities, |
100 |
'a|authorities' => \$authorities, |
| 101 |
'authtypes:s' => \$authtypes, |
101 |
'authtypes:s' => \$authtypes, |
| 102 |
'filter=s@' => \$filters, |
102 |
'filter=s@' => \$filters, |
| 103 |
'insert' => \$insert, |
103 |
'insert' => \$insert, |
| 104 |
'update' => \$update, |
104 |
'update' => \$update, |
| 105 |
'all' => \$all, |
105 |
'all' => \$all, |
| 106 |
'match=s@' => \$match, |
106 |
'match=s@' => \$match, |
| 107 |
'i|isbn' => \$isbn_check, |
107 |
'i|isbn' => \$isbn_check, |
| 108 |
'x:s' => \$sourcetag, |
108 |
'x:s' => \$sourcetag, |
| 109 |
'y:s' => \$sourcesubfield, |
109 |
'y:s' => \$sourcesubfield, |
| 110 |
'idmap:s' => \$idmapfl, |
110 |
'idmap:s' => \$idmapfl, |
| 111 |
'cleanisbn!' => \$cleanisbn, |
111 |
'cleanisbn!' => \$cleanisbn, |
| 112 |
'yaml:s' => \$yamlfile, |
112 |
'yaml:s' => \$yamlfile, |
| 113 |
'dedupbarcode' => \$dedup_barcode, |
113 |
'dedupbarcode' => \$dedup_barcode, |
| 114 |
'framework=s' => \$framework, |
114 |
'framework=s' => \$framework, |
| 115 |
'custom:s' => \$localcust, |
115 |
'custom:s' => \$localcust, |
| 116 |
'marcmodtemplate:s' => \$marc_mod_template, |
116 |
'marcmodtemplate:s' => \$marc_mod_template, |
| 117 |
'si|skip_indexing' => \$skip_indexing, |
117 |
'si|skip_indexing' => \$skip_indexing, |
| 118 |
'st|strict' => \$strict_mode, |
118 |
'sk|skip_bad_records' => \$skip_bad_records, |
| 119 |
); |
119 |
); |
| 120 |
|
120 |
|
| 121 |
$biblios ||= !$authorities; |
121 |
$biblios ||= !$authorities; |
|
Lines 343-349
RECORD: while () {
Link Here
|
| 343 |
} |
343 |
} |
| 344 |
if ($record) { |
344 |
if ($record) { |
| 345 |
|
345 |
|
| 346 |
if ($strict_mode) { |
346 |
if ($skip_bad_records) { |
| 347 |
my $xml = $record->as_xml_record(); |
347 |
my $xml = $record->as_xml_record(); |
| 348 |
eval { MARC::Record::new_from_xml( $xml, 'UTF-8', "MARC21" ); }; |
348 |
eval { MARC::Record::new_from_xml( $xml, 'UTF-8', "MARC21" ); }; |
| 349 |
if ($@) { |
349 |
if ($@) { |
|
Lines 1044-1049
If set, do not index the imported records with Zebra or Elasticsearch.
Link Here
|
| 1044 |
Use this when you plan to do a complete reindex of your data after running |
1044 |
Use this when you plan to do a complete reindex of your data after running |
| 1045 |
bulkmarciport. This can increase performance and avoid unnecessary load. |
1045 |
bulkmarciport. This can increase performance and avoid unnecessary load. |
| 1046 |
|
1046 |
|
|
|
1047 |
=item B<-sk, --skip_bad_records> |
| 1048 |
|
| 1049 |
If set, check the validity of records before adding. If they are invalid we will |
| 1050 |
print the outout of MARC::Lint->check_record and skip them during the import. Without |
| 1051 |
this option bad records may kill the job. |
| 1052 |
|
| 1047 |
=back |
1053 |
=back |
| 1048 |
|
1054 |
|
| 1049 |
=cut |
1055 |
=cut |
| 1050 |
- |
|
|