binmode( STDOUT, ":encoding(UTF-8)" );
my ( $input_marc_file, $number, $offset) = ('',0,0);
my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile);
-my ( $insert, $filters, $update, $all, $yamlfile, $authtypes );
+my ( $insert, $filters, $update, $all, $yamlfile, $authtypes, $append );
my $cleanisbn = 1;
my ($sourcetag,$sourcesubfield,$idmapfl, $dedup_barcode);
my $framework = '';
'fk' => \$fk_off,
'm:s' => \$format,
'l:s' => \$logfile,
+ 'append' => \$append,
'k|keepids:s' => \$keepids,
'b|biblios' => \$biblios,
'a|authorities' => \$authorities,
);
$biblios ||= !$authorities;
$insert ||= !$update;
+my $writemode = ($append) ? "a" : "w";
if ($all) {
$insert = 1;
$dbh->{AutoCommit} = 0;
my $loghandle;
if ($logfile){
- $loghandle= IO::File->new($logfile,"w") ;
+ $loghandle= IO::File->new($logfile, $writemode) ;
print $loghandle "id;operation;status\n";
}
RECORD: while ( ) {
File logs actions done for each record and their status into file
+=item B<-append>
+
+If specified, data will be appended to the logfile. If not, the logfile will be erased for each execution.
+
=item B<-t, -test>
Test mode: parses the file, saying what he would do, but doing nothing.