Slightly more verbose and commented xpath-sifter filter examples
This commit is contained in:
parent
935f4107cb
commit
8f3e1a0fdb
33
examples/filters/xpath-sifter/xpath-sifter.ini
Normal file
33
examples/filters/xpath-sifter/xpath-sifter.ini
Normal file
@ -0,0 +1,33 @@
|
||||
# The xpath_sifter filter allows you to stop entries from a feed being displayed
|
||||
# if they do not match a particular pattern.
|
||||
|
||||
# It is useful for things like only displaying entries in a particular category
|
||||
# even if the site does not provide per category feeds, and displaying only entries
|
||||
# that contain a particular string in their title.
|
||||
|
||||
# The xpath_sifter filter applies only after all feeds are normalised to Atom 1.0.
|
||||
# Look in your cache to see what entries look like.
|
||||
|
||||
[Planet]
|
||||
filters = xpath_sifter.py
|
||||
|
||||
# We are only interested in entries in the category "two" from this blogger, but
|
||||
# he does not provide a per-category feed.
|
||||
# The Atom for categories looks like this: <category term="two"/>, so here
|
||||
# we filter the http://example.com/uncategorised.xml file for entries with a
|
||||
# category tag with the term attribute equal to 'two'
|
||||
[http://example.com/uncategorised.xml]
|
||||
name = Category 'two' (from Site Without a Categorised Feed)
|
||||
[xpath_sifter.py]
|
||||
require:
|
||||
//atom:category[@term='two']
|
||||
|
||||
# The verbose blogger whose feed is below blogs about many subjects but we are
|
||||
# only interested in entries about Venus. She does not use categories but
|
||||
# fortunately her titles are very consistent, so we search within the title
|
||||
# tag's text for the text 'Venus'
|
||||
[http://example.com/verbose.xml]
|
||||
name = Venus (from Verbose Site)
|
||||
[xpath_sifter.py]
|
||||
require:
|
||||
//atom:title[contains(.,'Venus')]
|
Loading…
x
Reference in New Issue
Block a user