projects
/
Biblio-Z3950.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix skipping of fields >= 900
[Biblio-Z3950.git]
/
GoogleBooks.pm
diff --git
a/GoogleBooks.pm
b/GoogleBooks.pm
index
7806425
..
139ff94
100644
(file)
--- a/
GoogleBooks.pm
+++ b/
GoogleBooks.pm
@@
-9,6
+9,9
@@
use JSON::XS;
use base 'Scraper';
use base 'Scraper';
+my $pageCount_suffix = 'p.'; # English
+$pageCount_suffix = ' str.'; # Croatian
+
my $debug = $ENV{DEBUG} || 0;
sub diag {
my $debug = $ENV{DEBUG} || 0;
sub diag {
@@
-89,8
+92,6
@@
diag "got $hits results, get first one";
}
}
-our ( $hash, $marc );
-
sub next_marc {
my ($self,$format) = @_;
sub next_marc {
my ($self,$format) = @_;
@@
-102,7
+103,7
@@
sub next_marc {
my $id = $item->{id} || die "no id";
my $id = $item->{id} || die "no id";
- $marc = MARC::Record->new;
+
my
$marc = MARC::Record->new;
$marc->encoding('utf-8');
if ( my $vi = $item->{volumeInfo} ) {
$marc->encoding('utf-8');
if ( my $vi = $item->{volumeInfo} ) {
@@
-141,7
+142,7
@@
sub next_marc {
);
}
);
}
- $marc->add_fields(300,' ',' ','a' => $vi->{pageCount} .
'p.'
) if $vi->{pageCount};
+ $marc->add_fields(300,' ',' ','a' => $vi->{pageCount} .
$pageCount_suffix
) if $vi->{pageCount};
$marc->add_fields(520,' ',' ','a' => $vi->{description} ) if $vi->{description};
$marc->add_fields(520,' ',' ','a' => $vi->{description} ) if $vi->{description};