--- trunk/run.pl 2005/11/20 20:13:39 74 +++ trunk/run.pl 2005/11/23 00:14:05 113 @@ -14,6 +14,8 @@ use WebPAC::Output::TT; use WebPAC::Output::Estraier; +my $limit = shift @ARGV; + my $abs_path = abs_path($0); $abs_path =~ s#/[^/]*$#/#; @@ -25,7 +27,7 @@ my $isis = new WebPAC::Input::ISIS( code_page => 'ISO-8859-2', # application encoding - limit_mfn => 50, + limit_mfn => $limit, ); my $maxmfn = $isis->open( @@ -63,7 +65,11 @@ database => 'ps', ); -while (my $row = $isis->fetch) { +my $total_rows = 0; + +for ( 0 ... $isis->size ) { + + my $row = $isis->fetch || next; my $mfn = $row->{'000'}->[0] || die "can't find MFN"; @@ -71,20 +77,20 @@ # print STDERR Dumper($row, $ds); - my $html = $out->apply( - template => 'html_ffzg.tt', - data => $ds, - ); - - # create test output - - my $file = sprintf('out/%02d.html', $mfn ); - open(my $fh, '>', $file) or die "can't open $file: $!"; - print $fh $html; - close($fh); - - $html =~ s#\s*[\n\r]+\s*##gs; - +# my $html = $out->apply( +# template => 'html_ffzg.tt', +# data => $ds, +# ); +# +# # create test output +# +# my $file = sprintf('out/%02d.html', $mfn ); +# open(my $fh, '>', $file) or die "can't open $file: $!"; +# print $fh $html; +# close($fh); +# +# $html =~ s#\s*[\n\r]+\s*##gs; +# # print STDERR $html; $est->add( @@ -93,4 +99,10 @@ type => 'search', ); + $total_rows++; + }; + +my $log = $lookup->_get_logger; + +$log->info("$total_rows records indexed");