Lines 35-41
use open qw( :std :encoding(UTF-8) );
Link Here
|
35 |
binmode( STDOUT, ":encoding(UTF-8)" ); |
35 |
binmode( STDOUT, ":encoding(UTF-8)" ); |
36 |
my ( $input_marc_file, $number, $offset) = ('',0,0); |
36 |
my ( $input_marc_file, $number, $offset) = ('',0,0); |
37 |
my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile); |
37 |
my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile); |
38 |
my ( $insert, $filters, $update, $all, $yamlfile, $authtypes ); |
38 |
my ( $insert, $filters, $update, $all, $yamlfile, $authtypes, $append ); |
39 |
my $cleanisbn = 1; |
39 |
my $cleanisbn = 1; |
40 |
my ($sourcetag,$sourcesubfield,$idmapfl, $dedup_barcode); |
40 |
my ($sourcetag,$sourcesubfield,$idmapfl, $dedup_barcode); |
41 |
my $framework = ''; |
41 |
my $framework = ''; |
Lines 56-61
GetOptions(
Link Here
|
56 |
'fk' => \$fk_off, |
56 |
'fk' => \$fk_off, |
57 |
'm:s' => \$format, |
57 |
'm:s' => \$format, |
58 |
'l:s' => \$logfile, |
58 |
'l:s' => \$logfile, |
|
|
59 |
'append' => \$append, |
59 |
'k|keepids:s' => \$keepids, |
60 |
'k|keepids:s' => \$keepids, |
60 |
'b|biblios' => \$biblios, |
61 |
'b|biblios' => \$biblios, |
61 |
'a|authorities' => \$authorities, |
62 |
'a|authorities' => \$authorities, |
Lines 76-81
GetOptions(
Link Here
|
76 |
); |
77 |
); |
77 |
$biblios ||= !$authorities; |
78 |
$biblios ||= !$authorities; |
78 |
$insert ||= !$update; |
79 |
$insert ||= !$update; |
|
|
80 |
my $writemode = ($append) ? "a" : "w"; |
79 |
|
81 |
|
80 |
if ($all) { |
82 |
if ($all) { |
81 |
$insert = 1; |
83 |
$insert = 1; |
Lines 182-188
my $sth_isbn = $dbh->prepare("SELECT biblionumber,biblioitemnumber FROM biblioit
Link Here
|
182 |
$dbh->{AutoCommit} = 0; |
184 |
$dbh->{AutoCommit} = 0; |
183 |
my $loghandle; |
185 |
my $loghandle; |
184 |
if ($logfile){ |
186 |
if ($logfile){ |
185 |
$loghandle= IO::File->new($logfile,"w") ; |
187 |
$loghandle= IO::File->new($logfile, $writemode) ; |
186 |
print $loghandle "id;operation;status\n"; |
188 |
print $loghandle "id;operation;status\n"; |
187 |
} |
189 |
} |
188 |
RECORD: while ( ) { |
190 |
RECORD: while ( ) { |
Lines 632-637
The I<NUMBER> of records to wait before performing a 'commit' operation
Link Here
|
632 |
|
634 |
|
633 |
File logs actions done for each record and their status into file |
635 |
File logs actions done for each record and their status into file |
634 |
|
636 |
|
|
|
637 |
=item B<-append> |
638 |
|
639 |
If specified, data will be appended to the logfile. If not, the logfile will be erased for each execution. |
640 |
|
635 |
=item B<-t, -test> |
641 |
=item B<-t, -test> |
636 |
|
642 |
|
637 |
Test mode: parses the file, saying what he would do, but doing nothing. |
643 |
Test mode: parses the file, saying what he would do, but doing nothing. |
638 |
- |
|
|