Skip to main content.
home | support | download

Back to List Archive

Re: Fixing Swish 2.4.0 To Work on Windows

From: <moseley(at)not-real.hank.org>
Date: Tue Nov 11 2003 - 04:24:15 GMT
On Mon, Nov 10, 2003 at 07:43:34PM -0800, Ahmad, Zeeshan (FMC) wrote:
> A couple of things need to be changed when using swish_filter:
>    swish_filter.pl: 
>       use lib qw( ./lib/swish-e/perl );
>    your .config file:	
>       FileFilter .pdf ./lib/swish-e/swish_filter.pl '"%p" "%P"'

That all assumes you are running swish-e from the installation 
directory.

> 
> Path issue when using swish.cgi. Correct path to use:
>       use lib qw( ./perl );

swish.cgi should have the correct path at installation.  What was yours 
set to after installation?



> 
> Zeeshan Ahmad,
> FMC Computing Services
> 
> 
> -----Original Message-----
> From: swish-e@sunsite.berkeley.edu [mailto:swish-e@sunsite.berkeley.edu] On
> Behalf Of David L Norris
> Sent: Friday, 7 November 2003 6:00 PM
> To: Multiple recipients of list
> Subject: [SWISH-E] Re: Fixing Swish 2.4.0 To Work on Windows
> 
> On Thu, 2003-11-06 at 23:22, Ahmad, Zeeshan (FMC) wrote:
> > I was trying to index PDFs with Swish and encountered a bucket load of
> > problems. It took a lot of tinkering to get it right. In the process, I
> made
> > a few changes (mostly related to paths and directory names with spaces).
> If
> > you can't get file-system based PDF indexing right, try the following
> > changes. Platform: Win2K
> 
> SWISH::Filter is probably a better way to index PDF files and it's the
> same method used by the spiders.  SWISH::Filter currently provides PDF
> to HTML, Word Doc to Text, Excel to HTML, and ID3 to HTML.  You can also
> write your own SWISH::Filter modules and drop them into
> lib\swish-e\perl\SWISH\Filters.
> 
> 
> You should be able to use this (but see below):
>   FileFilter .pdf swish_filter.pl '"%p" "%P"'
> 
> 
> I probably should install the example scripts (index_hypermail.pl,
> _pdf2html.pl, MySQL.pl, file.pl, DirTree.pl) somewhere other than
> lib\swish-e by default.  I think Bill made that suggestion at some
> point.  I can see how that would be extremely confusing.
> 
> > ------------------------------------
> > 
> > Set correct filter path in configuration file. e.g.
> >    FileFilter .pdf ./lib/swish-e/_pdf2html.pl '"%p"'
> > 
> > Set correct path to pdf converters in _pdf2html.pl. e.g.
> >    $ENV{PATH} ='D:/Program Files/SWISH-E4/lib/swish-e;'. $ENV{PATH};
> 
> Yes, that's a good workaround.  I'll see if we can get that fixed in the
> next release.  We don't seem to be handling FileFilter correctly.  My
> intention is that everything in {prefix}\lib\swish-e should be directly
> executable using it's base name.
> 
> 
> Using my above example it does not work without modifying the PATH:
> C:\SWISH-E>swish-e -c cfg -i n:\temp\test.pdf
> Indexing Data Source: "File-System"
> Indexing "n:\temp\test.pdf"
> 'swish_filter.pl' is not recognized as an internal or external command,
> operable program or batch file.
> 
> 
> Bill, looks like we never fixed FilterOpen() in filter.c, line 298. 
> It's not using the new PATH stuff.  It's simply doing a popen().  I
> think it needs to be doing a get_env_path_with_libexecdir() beforehand.
> 
> -- 
>  David Norris
>   http://www.webaugur.com/dave/
>   ICQ - 412039
> 

-- 
Bill Moseley
moseley@hank.org
Received on Tue Nov 11 04:24:29 2003