projects
/
koha-eprints
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
transfer correct marc into import file
[koha-eprints]
/
tsv2eprints.pl
diff --git
a/tsv2eprints.pl
b/tsv2eprints.pl
index
7c9ea89
..
dec518b
100755
(executable)
--- a/
tsv2eprints.pl
+++ b/
tsv2eprints.pl
@@
-130,8
+130,11
@@
while(<$tsv_fh>) {
$stat->{new}++;
$stat->{new}++;
- seek $marc_fh, $last_offset, 0;
- read $marc_fh, my $marc, $offset - $last_offset;
+ seek $marc_fh, $offset, 0;
+ read $marc_fh, my $marc_len, 5;
+ seek $marc_fh, $offset, 0;
+
+ read $marc_fh, my $marc, $marc_len;
print $import_fh $marc;
warn "# NEW ", join(' ', map { $row{$_} } qw(biblionumber title)), "\n";
# warn "# NEW $biblionumber\n";
print $import_fh $marc;
warn "# NEW ", join(' ', map { $row{$_} } qw(biblionumber title)), "\n";
# warn "# NEW $biblionumber\n";
@@
-142,8
+145,6
@@
while(<$tsv_fh>) {
$stat->{missing}++;
}
$stat->{missing}++;
}
- $last_offset = $offset;
-
}
warn "# files left ", dump($files);
}
warn "# files left ", dump($files);