/[webpac2]/trunk/lib/WebPAC/Output/Estraier.pm
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/lib/WebPAC/Output/Estraier.pm

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

revision 303 by dpavlin, Mon Dec 19 23:29:25 2005 UTC revision 319 by dpavlin, Sat Dec 24 11:23:17 2005 UTC
# Line 17  WebPAC::Output::Estraier - Create Hyper Line 17  WebPAC::Output::Estraier - Create Hyper
17    
18  =head1 VERSION  =head1 VERSION
19    
20  Version 0.07  Version 0.08
21    
22  =cut  =cut
23    
24  our $VERSION = '0.07';  our $VERSION = '0.08';
25    
26  =head1 SYNOPSIS  =head1 SYNOPSIS
27    
# Line 40  Connect to Hyper Estraier index using HT Line 40  Connect to Hyper Estraier index using HT
40          passwd => 'admin',          passwd => 'admin',
41          database => 'demo',          database => 'demo',
42          encoding => 'iso-8859-2',          encoding => 'iso-8859-2',
43            clean => 1,
44   );   );
45    
46  Options are:  Options are:
# Line 90  sub new { Line 91  sub new {
91          my $url = $self->{masterurl} . '/node/' . $self->{database};          my $url = $self->{masterurl} . '/node/' . $self->{database};
92          $self->{url} = $url;          $self->{url} = $url;
93    
94          $log->debug("opening index $self->{url}");          if ($self->{clean}) {
95                    $log->debug("nodedel $self->{database}");
96                    $self->master( action => 'nodedel', name => $self->{database} );
97            } else {
98                    $log->debug("opening index $self->{url}");
99            }
100    
101          my $nodes = $self->master( action => 'nodelist' );          my $nodes = $self->master( action => 'nodelist' );
102    
# Line 193  sub add { Line 199  sub add {
199          }          }
200    
201          $log->debug("adding ", sub { $doc->dump_draft } );          $log->debug("adding ", sub { $doc->dump_draft } );
202          $self->{'db'}->put_doc($doc) || $log->logdie("can't add document $uri to node " . $self->{url} . " status: " . $self->{db}->status());          $self->{'db'}->put_doc($doc) || $log->warn("can't add document $uri with draft " . $doc->dump_draft . " to node " . $self->{url} . " status: " . $self->{db}->status());
203    
204          return 1;          return 1;
205  }  }
# Line 265  sub add_link { Line 271  sub add_link {
271    
272          @labels = grep(/^$args->{to}\t/, @labels);          @labels = grep(/^$args->{to}\t/, @labels);
273          my $label = shift @labels;          my $label = shift @labels;
274          $label = split(/\t/, $label)->[1] if ($label);          (undef,$label) = split(/\t/, $label) if ($label);
275    
276          if (! $label) {          if (! $label) {
277                  $log->warn("can't find label for $args->{to}, skipping link creaton");                  $log->warn("can't find label for $args->{to}, skipping link creaton");

Legend:
Removed from v.303  
changed lines
  Added in v.319

  ViewVC Help
Powered by ViewVC 1.1.26