--- trunk/html/swish.cgi 2003/03/18 19:08:56 20 +++ trunk/html/swish.cgi 2003/03/18 20:20:11 21 @@ -95,17 +95,22 @@ $s=~tr/¹©ðÐèÈæƾ®/sSdDcCcCzZ/; $s=~s/\*\*+/*/g; + my @properties = split(/\s+/,x($config->{properties})); + my $sh = SWISH->connect('Fork', prog => x($config->{prog}), indexes => x($config->{index}), -# properties => [qw/god br nr/], + properties => \@properties, results => sub { my ($sh,$hit) = @_; + my $hit_fmt = x($config->{hit}) || + "%s [%s]
\n"; + if ($config->{url}) { - printf ("%s [%s]
\n","http://".virtual_host().x($config->{url}).$hit->swishdocpath,$hit->swishtitle || 'untitled',$hit->swishrank); + printf ($hit_fmt ,"http://".virtual_host().x($config->{url}).$hit->swishdocpath,$hit->swishtitle || 'untitled',$hit->swishrank); } else { - printf ("%s [%s]
\n",$hit->swishdocpath,$hit->swishtitle || 'untitled',$hit->swishrank); + printf ($hit_fmt ,$hit->swishdocpath,$hit->swishtitle || 'untitled',$hit->swishrank, map($hit->$_, @properties) ); }