for mondifications within leader, use substr(rec('leader'),from,to)
instead of proposed leader(field,nr) syntax
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@908
07558da8-63fa-0310-ba24-
9fe276d99e06
'LWP' => 0,
'File::Path' => 0,
'Biblio::Isis' => 0.24,
- 'MARC::Fast' => 0.05,
+ 'MARC::Fast' => 0.08,
'Search::Estraier' => 0.06,
'List::Util' => 0,
'Spreadsheet::ParseExcel', => 0,
+ work without indexers installed or enabled [2.30]
+ simpliest possible conf/llin.yml as example
+ WebPAC::Output::JSON to produce data for Simile's exhibit
++ leader from WebPAC::Input::MARC is now available as rec('leader')
+- indicator(field,nr) nr=1|2 for MARC input
+- show i1 and i2 in statistcs specially
- load_ds/save_ds should use on-disk hash to preserve inodes
-- leader(position,...), indicator(field,nr) nr=1|2 for MARC input
- validate should ignore modify_file
- add option to specify output marc path in config.yml
- add dBase input format
use MARC::Fast 0.03;
use base qw/WebPAC::Common/;
+use Carp qw/confess/;
=head1 NAME
=head1 VERSION
-Version 0.08
+Version 0.09
=cut
-our $VERSION = '0.08';
+our $VERSION = '0.09';
=head1 SYNOPSIS
if ($mfn > $self->{_marc_size}) {
$self->_get_logger()->warn("seek beyond database size $self->{_marc_size} to $mfn");
} else {
- my $row = $self->{_marc_db}->to_hash($mfn);
+ my $marc = $self->{_marc_db} || confess "no _marc_db?";
+ my $row = $marc->to_hash($mfn);
push @{$row->{'000'}}, $mfn;
+ push @{$row->{'leader'}}, $marc->last_leader;
return $row;
}
}
#!/usr/bin/perl -w
-use Test::More tests => 118;
+use Test::More tests => 123;
use Test::Exception;
use Cwd qw/abs_path/;
use blib;
my $no_log = $debug ? 0 : 1;
ok(my $abs_path = abs_path($0), "abs_path");
-$abs_path =~ s#/[^/]*$#/#;
+$abs_path =~ s#/[^/]*$#/#; #vim
my $module = 'WebPAC::Input::ISIS';
diag "testing with $module";
-throws_ok { my $input = new WebPAC::Input( ) } qr/module/, "need module";
+throws_ok { my $input = new WebPAC::Input( no_log => $no_log ) } qr/module/, "need module";
ok(my $input = new WebPAC::Input( module => $module, no_log => $no_log, no_progress_bar => 1, stats => 1 ), "new $module");
ok(my $input_lm = new WebPAC::Input( module => $module, no_log => $no_log, no_progress_bar => 1 ), "new $module");
cmp_ok($input->pos, '==', $mfn, "pos $mfn");
push @db, $rec;
ok(my $dump = $input->dump_ascii, "dump_ascii $mfn");
+ # XXX test count will help us keep this test in-line :-)
+ ok($rec->{leader}, "leader $mfn") if $rec->{leader};
diag $dump if ($debug);
}