61 |
my $filter; |
my $filter; |
62 |
foreach my $f (qw/pdftotext pstotext/) { |
foreach my $f (qw/pdftotext pstotext/) { |
63 |
my $w = which($f); |
my $w = which($f); |
64 |
if ($f) { |
if ($w) { |
65 |
$filter->{$f} = $w; |
$filter->{$f} = $w; |
66 |
print STDERR "using $f filter at $w\n" if ($verbose); |
print STDERR "using $f filter at $w\n" if ($verbose); |
67 |
} |
} |
237 |
|
|
238 |
if ($contents) { |
if ($contents) { |
239 |
# html2text |
# html2text |
240 |
|
$contents =~ s#<script.*?</script>##gis; |
241 |
$contents =~ s#<[^>]+/*>##gs; |
$contents =~ s#<[^>]+/*>##gs; |
242 |
$contents =~ s#\s\s+# #gs; |
$contents =~ s#\s\s+# #gs; |
243 |
|
|