package SWISH::Filters::Doc2txt; use strict; use vars qw(
$VERSION @ISA ); $VERSION = '0.18'; @ISA =
('SWISH::Filters::Base'); sub new { my ($class) = @_; my $self =
bless { mimetypes => [qr!application/(x-)?msword!] , # list of
types this filter handles priority => 50 , # Make this a higher
number (lower priority than the wvware filter }, $class; # check
for helpers return $self->set_programs('catdoc'); } sub filter {
my ( $self, $doc ) = @_; my $content = $self->run_catdoc(
$doc->fetch_filename ) || return; # update the document's
content type $doc->set_content_type('text/plain'); # return the
document return \$content; } 1; __END__ =head1 NAME
SWISH::Filters::Doc2txt - Perl extension for filtering MSWord
documents with Swish-e =head1 DESCRIPTION This is a plug-in
module that uses the "catdoc" program to convert MS Word
documents to text for indexing by Swish-e. "catdoc" can be
downloaded from: The program "catdoc" must be installed and your
PATH before running Swish-e. =head1 BUGS This filter does not
spec