Skip to main content.
home | support | download

Back to List Archive

Re: Using ExtractPath to Assign a Property

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri Dec 14 2001 - 22:27:39 GMT
At 02:09 PM 12/14/01 -0800, Bob Stewart wrote:
>I am using ExtractPath to assign a searchable metaname and this works fine:
>
>[form config file:]
>MetaNames forum
>ExtractPath forum regex !^.*/forums/load/([^/]+)/.*$!$1!
>
>Is there any way to assign extracted path info to a property?

No, not right now.  Not a bad idea.  I guess I figured one would just use
the same regular expression in the CGI script to extract out that path part
from the swishdocpath property.

It will be a little work (more finding the time).  The code that does
ExtractPath -- index_path_parts() -- would need to get passed info on the
file entry so the property is added to the correct file.  But once that's
done, then it's just a matter of calling addDocProperty().  A few lines of
code, that's all.

How bad do you need it?  Can you use a regexp in your CGI to pull out the
path?

BTW - since you are using ExtractPath, please offer any suggestions on
improvements.  I've never been thrilled about having to match the entire
path, but I'm not so sure if that bothers others.







Bill Moseley
mailto:moseley@hank.org
Received on Fri Dec 14 22:27:46 2001