my $conf = {}; # configuration hashref
my $count = 0;
+my $start = time;
$| = 1;
initialize($conf);
}
}
-
+ # "Accompanying material" (300e)
+ $marc{accomp} = $record->field('300')->subfield('e')
+ if $record->field('300');
# issn, lccn, title, desc, pages, pub, pubyear, edition
$marc{lccn} = $record->field('010')->subfield('a') if $record->field('010');
$marc->{title}, $marc->{lccn}) ,"\n";
}
- # case e : author, publisher, pubyear, pages
+ if ($marc->{accomp}) { # case e : accomp
+ print OF join("\t", $marc->{id}, "case d",
+ $marc->{item_form}, $marc->{date1},
+ $marc->{record_type}, $marc->{bib_lvl},
+ $marc->{title}, $marc->{accomp}) ,"\n";
+ }
+
+ # case z : author, publisher, pubyear, pages
if ($marc->{author} and $marc->{publisher} and $marc->{pubyear}
and $marc->{pages}) {
print OF join("\t", $marc->{id}, "case e",
}
print XF "Record ", $marc->{id}, " did not make the cut: ";
print XF "Missing item_form. " unless ($marc->{item_form});
- print XF "Missing date1. " unless (defined $marc->{date1});
- print XF "Invalid date1: ", $marc->{date1}
- unless ($marc->{date1} =~ /\d{4}/);
+ unless (defined $marc->{date1})
+ { print XF "Missing date1. " }
+ else
+ { print XF "Invalid date1: ", $marc->{date1}
+ unless ($marc->{date1} =~ /\d{4}/); }
print XF "Missing record_type. " unless ($marc->{record_type});
print XF "Missing bib_lvl. " unless ($marc->{bib_lvl});
print XF "Missing title. " unless ($marc->{title});
sub progress_ticker {
return if $conf->{quiet};
-
- if ($count % 100 == 0) {
- print '|';
- print " $count \n" unless ($count % 1400);
- } elsif ($count % 20 == 0) {
- print '.';
- }
+ printf("> %d (%d/s)\r", $count, ($count / (time - $start)))
+ if ($count % 100 == 0);
}
=head2 show_help