+ add more input formats (MARC::Fast and others) [2.00_6]
+ update to use Search::Estraier [2.09]
+ fix characters generated in [% search %] (move that to Webpacus?)
-- fix nasty bug with repeatable subfields [2.10]
++ fix nasty bug with repeatable subfields [2.10]
- remove delimiters characters from index and query entered
- delete unused files in database directories
- scoring for various fields in input/*.xml
#, SCREEN
# you can specify methods from WebPAC here also!
-log4perl.logger.main=INFO
+#log4perl.logger.main=INFO
#log4perl.logger.main=DEBUG
#log4perl.logger.WebPAC=DEBUG
#log4perl.logger.WebPAC.Input.ISIS.fetch=DEBUG
#log4perl.logger.WebPAC.Input.ISIS.open=DEBUG
-#log4perl.logger.WebPAC.Normalize=DEBUG
+#log4perl.logger.WebPAC.Normalize.=DEBUG
#log4perl.logger.WebPAC.Normalize.new=DEBUG
#log4perl.logger.WebPAC.Normalize.XML=DEBUG
#log4perl.logger.WebPAC.Normalize.data_structure=DEBUG
-#log4perl.logger.WebPAC.Normalize.fill_in_to_arr=DEBUG
-#log4perl.logger.WebPAC.Normalize.parse_to_arr=DEBUG
#log4perl.logger.WebPAC.Output.TT=DEBUG
#log4perl.logger.WebPAC.Output.Estraier=DEBUG
=head1 VERSION
-Version 2.09
+Version 2.10
=cut
-our $VERSION = '2.09';
+our $VERSION = '2.10';
=head1 SYNOPSIS
}
if (! @v) {
$log->debug("$field <",$self->{tag},"> format: $format no values");
-# next;
+ next;
} else {
$log->debug("$field <",$self->{tag},"> format: $format values: ", join(",", @v));
}
$log->logconfess("need HASH as first argument!") if ($rec !~ /HASH/o);
return if (! $format_utf8);
+ $log->debug("using $code on $format_utf8");
+
my $i = 0;
my $max = 0;
my @arr;
my $rec_size = {};
while ($i <= $max) {
- my $v = $self->$code($rec,$format_utf8,$i++,\$rec_size) || next;
- push @arr, $v;
+ my @v = $self->$code($rec,$format_utf8,$i++,\$rec_size);
if ($rec_size) {
foreach my $f (keys %{ $rec_size }) {
$max = $rec_size->{$f} if ($rec_size->{$f} > $max);
}
- warn "max set to $max, rec_size = ", Dumper($rec_size);
+ $log->debug("max set to $max");
undef $rec_size;
}
+ if (@v) {
+ push @arr, @v;
+ } else {
+ push @arr, '';
+ }
}
$log->debug("format '$format_utf8' returned ",--$i," elements: ", sub { join(" | ",@arr) }) if (@arr);
push @{$rec->{'000'}}, 42 unless ($rec->{'000'});
#diag "test normalisation of: ",Dumper($n->{import_xml}->{indexer}, $rec);
ok(my $ds = $n->data_structure( $rec ), "data_structure");
- diag Dumper($ds) if ($i == 0);
+ #diag Dumper($ds->{$tag}->{display}); # if ($i == 0);
cmp_ok($ds->{$tag}->{display}->[$i], 'eq', $r, "parse $tag/$i - $r");
}
{ content => 'v900^x' },
] },
'Tag_s1' => { 'isis' => [
- { content => 's900^b = s900^x' },
+ { content => 'v900^a = v900^c' },
] },
'Tag_s2' => { 'isis' => [
{ content => 's900^a s900^b s900^c s900^x' },
parse_test_arr($import, 'Tag_b', $rec, [ 'b1','b2','b3','b4' ] );
parse_test_arr($import, 'Tag_c', $rec, [ '','','c1','c2' ] );
parse_test_arr($import, 'Tag_x', $rec, [ 'b1','a1_b2','b3_c1','a2_b4_c2' ] );
-parse_test_arr($import, 'Tag_s1', $rec, [ 'b1 = b1', 'b1 = b1', 'b1 = b1', 'b1 = b1' ] );
+parse_test_arr($import, 'Tag_s1', $rec, [ '', 'a1', 'c1', 'a2 = c2' ] );