Skip to main content.
home | support | download

Back to List Archive

Re: question

From: Bill Moseley <moseley(at)>
Date: Fri Feb 08 2002 - 17:30:35 GMT
At 08:35 AM 02/08/02 -0800, Rich Thomas wrote:
>How does one configure swish to index a directory tree of html files?  I've
>looked at the example and am having a tough time underdatnding
>the -S prog concept I guess.
>Where do I tell it what the top level directory is?  Since these are all
>html files I don't need the pdf format conversion so I can comment that out
>till needed.

Here's the overview of -S prog:  Instead of -i or IndexDir pointing to a
file or directory, with -S prog those point to program(s).  If more than
one program is listed it will run them one after another.  

e.g. I index one site where part of the site is static pages and I use, and the other is dynamically generated via MySQL database, so I use

    Indexdir ./ ./

But often with programs you want to pass parameters.  It all depends on the
program., for example, if no parameters are passed it will look
for a default config file for its parameters.  But if you want to pass
parameters to a -S prog program you use:


For example with you can say


and the spider will then use for it's parameters.  With it expects a starting directory (or directories).

   SwishProgParameters /home/bill/html

In it start off like:

        wanted => \&wanted,
        # no_chdir => 1,  # 5.6 feature

@ARGV is the parameter list passed to by swish (via
SwishProgParameters). is just suppose to be a template for you to build on.  If you
don't know perl, you can use another programming language.  Or a shell script.

>Would I do something like swish-e -S prog -i ./  ?  And if so...
>how do I tell it what to index?

     SwishProgParameters /dir/to/index  /other/dir/to/index

Bill Moseley
Received on Fri Feb 8 17:35:46 2002