X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=fingerprinter;h=feb6c194d66b2efed7fe71b99b02f5a0d73b4469;hp=9c99ef161e0c739f1e425f763d2d6a7fc78ead11;hb=d0dac5a8fa5534fa3cda1abb0d05130ec9e1414a;hpb=5b73b8b71641c55e829c0bdcd82cd7f03a88405f diff --git a/fingerprinter b/fingerprinter index 9c99ef1..feb6c19 100755 --- a/fingerprinter +++ b/fingerprinter @@ -10,6 +10,7 @@ use MARC::File::XML ( BinaryEncoding => 'utf-8' ); my $conf = {}; # configuration hashref my $count = 0; +my $failcount = 0; my $start = time; $| = 1; @@ -31,9 +32,9 @@ for my $file (@ARGV) { while ( eval { $record = $batch->next } ) { if ($@) - { print XF "MARC::Batch error $@"; next } - my $marc = undef; + { print XF "MARC::Batch error $@"; $failcount++; next } $count++; progress_ticker(); + my $marc = undef; unless ( defined $record ) { dump_exception($marc); next; } @@ -51,8 +52,12 @@ for my $file (@ARGV) { dump_fingerprints($marc); } } -print "\nProcessed $count records\n" unless $conf->{quiet}; +unless ($conf->{quiet}) { + print "\nSuccessfully processed:\t$count\n"; + print "Failed to process:\t$failcount\n"; + print "Total: ", ($count + $failcount), "\n"; +} =head2 populate_marc