projects
/
MARC-Fast
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added to_hash, small fix to test, better output in dump_fastmarc.pl [0.02]
[MARC-Fast]
/
scripts
/
dump_fastmarc.pl
diff --git
a/scripts/dump_fastmarc.pl
b/scripts/dump_fastmarc.pl
index
a37171c
..
538f8ea
100755
(executable)
--- a/
scripts/dump_fastmarc.pl
+++ b/
scripts/dump_fastmarc.pl
@@
-17,22
+17,24
@@
my $marc = new MARC::Fast(
debug => $opt{'d'},
);
debug => $opt{'d'},
);
-print STDERR "$file has ",$marc->count," records...\n";
my $min = 1;
my $max = $marc->count;
if (my $mfn = $opt{'n'}) {
$min = $max = $mfn;
my $min = 1;
my $max = $marc->count;
if (my $mfn = $opt{'n'}) {
$min = $max = $mfn;
+ print STDERR "Dumping $mfn only\n";
+} else {
+ print STDERR "$file has $max records...\n";
}
}
-print STDERR "Dumping $min - $max\n" if ($opt{'d'});
-
for my $mfn ($min .. $max) {
my $rec = $marc->fetch($mfn) || next;
for my $mfn ($min .. $max) {
my $rec = $marc->fetch($mfn) || next;
+ print Dumper($rec);
print "REC $mfn\n";
foreach my $f (sort keys %{$rec}) {
print "REC $mfn\n";
foreach my $f (sort keys %{$rec}) {
- print "$f\t",
$rec->{$f}
,"\n";
+ print "$f\t",
join('', $rec->{$f})
,"\n";
}
print "\n";
}
print "\n";
+ print Dumper($marc->to_hash($mfn));
}
}