Skip to main content.
home | support | download

Back to List Archive

Re: Way to index various file formats lacking filename extensions ?

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Jun 17 2003 - 04:38:27 GMT
On Sat, Jun 14, 2003 at 09:29:18PM -0700, Sven Crouse wrote:
> Hi list.  I'm new to swish-e.  I would like to use it to index local files of 
> various formats.  I searched the mailing list archives and documentation for 
> a way to use magic number tests on extension-less files, but couldn't find 
> anything relevant.  Is there a way ?

Not as is, but it would not be hard to do.  For example, you could edit
the SWISH::Filter module to use the file(1) or perhaps the "file" Perl
module and then map to a content-type from that output.

As an example, you can see how Mime::Types is used in the SWISH::Filter
module to set the content-type from the file name.
Received on Tue Jun 17 04:39:20 2003