Skip to main content.
home | support | download

Back to List Archive

Re: Adding files from external site - suggestions?

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Apr 28 2004 - 18:07:25 GMT
On Wed, Apr 28, 2004 at 01:44:07PM -0400, Rob de Santos AFANA wrote:
> Bill Moseley wrote:
> > Hum, I thought ReplaceRules still worked with -S prog.
> 
> It seems to work fine with the portion of the index fed by Spider.pl
> just not the DirTree.pl portion.

Then you have your ReplaceRules regexp wrong because swish-e doesn't know where the
data is coming from.  Use -T regexp to see what's happening in a
kinda cryptic way.

> find(
>     {
>         wanted => \&wanted,
>         no_chdir => 1,  # 5.6 feature
>         follow => $options{follow_symlinks},
>     },
>     $ENV{DIRTREE},
>     $path =~
> s[^/home/afana/public_html/(.+)afl/(.+).html][http://\1cgi-bin/at.pl?a=1
> 95711&e=/afl/\2];
> );

No.

find is, well like the unix find command.  It calls the wanted()
subroutine for each file or directory it finds.

So, you will want to place that somewhere else.  Like maybe in the
"output_document()" function.

Or, use ReplaceRules in your swish-e config.  Again, use -T regexp to
see how it's matching or not matching to find out why it's not working
like you think it should.



-- 
Bill Moseley
moseley@hank.org
Received on Wed Apr 28 11:07:25 2004