I like the idea you have for matching extensions and also matching file
names, when they are given in the config file. How about this
as an alternative solution: treat the items listed on the IndexOnly
line as true suffixes... a file will match if the last X characters of the
filename match one of the suffixes exactly. That way people could
specific ".html", or "html", or "index.html" and they all do what is
expected. (But only if you expect "myindex.html" to match.)
My implementation left in one odd behavior from the original
implementation, and that is any filename with no dot in it is rejected,
even if it would have matched a suffix. I figure that changing
that would cause someone some grief, so I left it alone, although
I bet it is just an optimization.
I'm collecting these changes together and plan on posting them all
soon (for NT). I've gotten a little feedback on the other mods I made and
so far so good.
At 11:33 AM 8/13/98 -0700, Earl Fogel wrote:
>Hmm, ok, that would work. But since I maintain multiple indicies,
>I'd have to maintain one copy of Swish-E in which "FileRules filename"
>includes matching files, and another in which it excludes files.
>So instead, I've changed IndexOnly to allow dots inside a suffix. It works
>exactly as before for suffixes without a dot, but if there is a dot, then it
>tries to match the whole thing.
>I can supply patches if anyone else is interested in them.
>On Thu, 13 Aug 1998, Ron Klatchko wrote:
>>Earl Fogel wrote:
>>> I want to index *only* files named index.html.
>>SWISH does not directly support what you want. If you don't mind
>>hacking SWISH, it would be quite easy to add/modify support for that.
>>In file index.c, line 147 is:
>> if (!strcmp(dp->d_name, tmplist->line))
>>This is the line that verifies that the file name is not in a FileRules
>>filename is rule. If you remove the exclamation point, you'll reverse
>>the logic and now The FileRules filename is rule will only index files
>>that are listed. Make sure to add FileRules filename is index.html and
>>you should be on your way.
>> Ron Klatchko - Manager, Advanced Technology Group
>> UCSF Library and Center for Knowledge Management
Received on Thu Aug 13 19:23:18 1998