/[webpac2]/trunk/run.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/run.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 76 by dpavlin, Sun Nov 20 20:32:46 2005 UTC revision 113 by dpavlin, Wed Nov 23 00:14:05 2005 UTC
# Line 65  my $est = new WebPAC::Output::Estraier( Line 65  my $est = new WebPAC::Output::Estraier(
65          database => 'ps',          database => 'ps',
66  );  );
67    
68  while (my $row = $isis->fetch) {  my $total_rows = 0;
69    
70    for ( 0 ... $isis->size ) {
71    
72            my $row = $isis->fetch || next;
73    
74          my $mfn = $row->{'000'}->[0] || die "can't find MFN";          my $mfn = $row->{'000'}->[0] || die "can't find MFN";
75    
# Line 73  while (my $row = $isis->fetch) { Line 77  while (my $row = $isis->fetch) {
77    
78  #       print STDERR Dumper($row, $ds);  #       print STDERR Dumper($row, $ds);
79    
80          my $html = $out->apply(  #       my $html = $out->apply(
81                  template => 'html_ffzg.tt',  #               template => 'html_ffzg.tt',
82                  data => $ds,  #               data => $ds,
83          );  #       );
84    #
85          # create test output  #       # create test output
86    #
87          my $file = sprintf('out/%02d.html', $mfn );  #       my $file = sprintf('out/%02d.html', $mfn );
88          open(my $fh, '>', $file) or die "can't open $file: $!";  #       open(my $fh, '>', $file) or die "can't open $file: $!";
89          print $fh $html;  #       print $fh $html;
90          close($fh);  #       close($fh);
91    #
92          $html =~ s#\s*[\n\r]+\s*##gs;  #       $html =~ s#\s*[\n\r]+\s*##gs;
93    #
94  #       print STDERR $html;  #       print STDERR $html;
95    
96          $est->add(          $est->add(
# Line 95  while (my $row = $isis->fetch) { Line 99  while (my $row = $isis->fetch) {
99                  type => 'search',                  type => 'search',
100          );          );
101    
102            $total_rows++;
103    
104  };  };
105    
106    my $log = $lookup->_get_logger;
107    
108    $log->info("$total_rows records indexed");

Legend:
Removed from v.76  
changed lines
  Added in v.113

  ViewVC Help
Powered by ViewVC 1.1.26