[Pywikipedia-l] Feature request for pagegenerators.RegexFilterPageGenerator

Dr. Trigon dr.trigon at surfeu.ch
Sat Sep 18 22:06:08 UTC 2010


Hello all

I'd like to suggest the code change given by the attached patch.

The idea is to change RegexFilterPageGenerator a little bit. First
change the 'regex' param to a list of regex(es) instead of 1 single.
The whole list of regex will be checked for a positive match. The
second change involves a new parameter 'invert' which, if set to
True changes the generator from returning pages on ANY POSITIVE match
to return page on NO POSITIVE match AT ALL. This way a positive
(additive) and negative (subtractive) filter behaviour can be achieved.

This would also be very helpful for my bot... ;)

Thanks a lot and greetings
DrTrigon
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
Url: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20100919/bc8ab881/attachment.txt 


More information about the Pywikipedia-l mailing list