Setting up xpath_sifter.py in config.ini

Sam Ruby rubys at intertwingly.net
Mon Oct 23 08:23:27 EST 2006


Sam Ruby wrote:
> Harry Fuecks wrote:
>> Following on from
>> http://lists.planetplanet.org/archives/devel/2006-October/001189.html
>> - (thanks for fixing)
>>
>> Is it possible to define the require / exclude xpath statements for
>> xpath_sifter.py on a per-feed basis in config.ini, under the sectiton
>> for ? It seems like they can only be defined once and are then applied
>> to all feeds, but I may have misunderstood. Dealing with two seperate
>> feeds now where there are multiple authors, but only want entries from
>> one of them in each case.
> 
> Not at the moment, but it would be easy to add.
> 
> One thought would be to allow the filter name to be followed by a set of 
> name/value pairs.  A familiar syntax to most is URI parameters, and that 
> even provides a built in syntax for escaping.  In the case of xpath 
> expressions (which tend to use special characters), this looks a bit 
> odd, but workable:
> 
> filters = 
> xpath_sifter.py?require=//atom%3Acategory%5B%40term%3D%27two%27%5D

I've committed this change.

- Sam Ruby


More information about the devel mailing list