16 |
|
|
17 |
my $webpac = new WebPAC( |
my $webpac = new WebPAC( |
18 |
code_page => 'ISO-8859-2', |
code_page => 'ISO-8859-2', |
19 |
limit_mfn => 100, |
# limit_mfn => 100, |
20 |
# debug => 1, |
# debug => 1, |
21 |
) || die; |
) || die; |
22 |
|
|
24 |
|
|
25 |
my $index = new WebPAC::jsFind( |
my $index = new WebPAC::jsFind( |
26 |
index_path => './out/index', |
index_path => './out/index', |
27 |
|
keys => 80, |
28 |
) || die; |
) || die; |
29 |
|
|
30 |
$|=1; |
$|=1; |
63 |
print OUT $webpac->output( |
print OUT $webpac->output( |
64 |
template => 'html.tt', |
template => 'html.tt', |
65 |
data => \@ds, |
data => \@ds, |
66 |
|
headline => $webpac->{'headline'}, |
67 |
); |
); |
68 |
close(OUT); |
close(OUT); |
69 |
} else { |
} else { |
70 |
print $webpac->output( |
print $webpac->output( |
71 |
template => 'text.tt', |
template => 'text.tt', |
72 |
data => \@ds, |
data => \@ds, |
73 |
|
headline => $webpac->{'headline'}, |
74 |
); |
); |
75 |
} |
} |
76 |
|
|
77 |
my $headline; |
my $headline = $webpac->{'headline'}; |
78 |
foreach my $ds (@ds) { |
|
79 |
if ($ds->{'tag'} eq 'headline') { |
my $f = $filename; |
80 |
$headline = join(" ",@{$ds->{'display'}}); |
$f =~ s!out/!!; |
|
last; |
|
|
} |
|
|
} |
|
81 |
|
|
82 |
# save into index |
# save into index |
83 |
foreach my $ds (@ds) { |
foreach my $ds (@ds) { |
85 |
|
|
86 |
$index->insert( |
$index->insert( |
87 |
index_name => $ds->{'tag'}, |
index_name => $ds->{'tag'}, |
88 |
path => $filename, |
path => $f, |
89 |
headline => $headline, |
headline => $headline, |
90 |
words => join(" ",@{$ds->{'swish'}}) |
words => join(" ",@{$ds->{'swish'}}) |
91 |
); |
); |