+ 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')
++ show i1 and i2 in statistcs specially (sorted first)
- 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
- validate should ignore modify_file
- add option to specify output marc path in config.yml
my $o = sprintf("%4s %d ~", $f, $v);
if (defined($s->{sf}->{$f})) {
+ my @subfields = keys %{ $s->{sf}->{$f} };
+warn "$f has subfields ",dump( @subfields );
map {
$o .= sprintf(" %s:%d%s", $_,
$s->{sf}->{$f}->{$_}->{count},
$s->{sf}->{$f}->{$_}->{repeatable} ? '*' : '',
);
- } sort keys %{ $s->{sf}->{$f} };
+ } (
+ # first indicators
+ sort( grep( /^i[12]$/, @subfields ) ),
+ # then subfileds
+ sort( grep( !/^i[12]$/, @subfields ) ),
+ );
}
if (my $v_r = $s->{repeatable}->{$f}) {
test_start_limit($input, 3, $size, $size - 2);
test_start_limit($input, 1, $size + 2, $size);
-ok(my $s = $input->stats, 'stats');
+ok(my $s = $input->stats, "$module stats");
diag "stats:\n$s" if ($debug);
$module = 'WebPAC::Input::MARC';
diag "testing with $module";
-ok($input = new WebPAC::Input( module => $module, no_log => $no_log, no_progress_bar => 1 ), "new $module");
+ok($input = new WebPAC::Input( module => $module, no_log => $no_log, no_progress_bar => 1, stats => 1 ), "new $module");
ok($input->open( path => "$abs_path/data/marc.iso" ), "open marc.iso");
test_fetch($input, $input->size);
+ok(my $s = $input->stats, "$module stats");
+
+diag "stats:\n$s" if ($debug);
# test modify_record
$module = 'WebPAC::Input::Test';
ok($input = new WebPAC::Input( module => $module, no_log => $no_log, no_progress_bar => 1, debug => $debug ), "new $module");