use WebPAC::Output::TT;
use WebPAC::Output::Estraier;
+my $limit = shift @ARGV;
+
my $abs_path = abs_path($0);
$abs_path =~ s#/[^/]*$#/#;
my $isis = new WebPAC::Input::ISIS(
code_page => 'ISO-8859-2', # application encoding
- limit_mfn => 50,
+ limit_mfn => $limit,
);
my $maxmfn = $isis->open(
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";
# 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(
type => 'search',
);
+ $total_rows++;
+
};
+
+my $log = $lookup->_get_logger;
+
+$log->info("$total_rows records indexed");