Package bridge :: Package filter :: Module atom
[hide private]
[frames] | no frames]

Module atom

source code

Functions [hide private]
  _is_before_date(node, dt_pivot, strict=True)
  _is_after_date(node, dt_pivot, strict=True)
  _cmp_date(func, name, element, dt_pivot, strict=True, recursive=False, include_feed=True)
  published_after(element, dt_pivot, strict=True, recursive=False, include_feed=True)
Returns the list of elements which have been published after the given date.
  updated_after(element, dt_pivot, strict=True, recursive=False, include_feed=True)
Returns the list of elements which have been updated after the given date.
  published_before(element, dt_pivot, strict=True, recursive=False, include_feed=True)
Returns the list of elements which have been published before the given date.
  updated_before(element, dt_pivot, strict=True, recursive=False, include_feed=True)
Returns the list of elements which have been updated before the given date.
  lookup_entry(element, id)
Returns the first entry matching the id provided in parameter
  lookup_links(element, **kwargs)
returns a list of links matching the attributes passed as parameters.
  requires_summary(element)
Returns True if the entry requires an atom:summary to be added based on section 4.1.2 of RFC 4287.
  requires_author(element)
Returns True if the entry requires an atom:author to be added based on section 4.1.2 of RFC 4287.
  valid_categories(element, test_set, matching=None)
  fetch_empty_authors(element, matching=None)
Return a list of atom:author elements which have an empty text for the children specified in 'matching' (which if not provided defaults to "name")

Variables [hide private]
  ATOM10_NS = u'http://www.w3.org/2005/Atom'
  ATOMPUB_NS = u'http://purl.org/atom/app#'
  XHTML1_NS = u'http://www.w3.org/1999/xhtml'
  THR_NS = u'http://purl.org/syndication/thread/1.0'
  _xml_media_types = ['text/xml', 'application/xml', 'text/xml-external-p...

Function Details [hide private]

_is_before_date(node, dt_pivot, strict=True)

source code 
None

_is_after_date(node, dt_pivot, strict=True)

source code 
None

_cmp_date(func, name, element, dt_pivot, strict=True, recursive=False, include_feed=True)

source code 
None

published_after(element, dt_pivot, strict=True, recursive=False, include_feed=True)

source code 

Returns the list of elements which have been published after the given date.

Keyword arguments: element -- atom feed or entry element dt_pivot -- datetime instance to compare to strict -- if True only accepts elements which are published strictly after the dt_pivot. if False elmeents which published date equal dt_pivot will be included in the result recursive -- if the element is a feed and recursive is True it will iterate through the feed entries as well include_feed -- if the element is a feed, recursive is True but you don't want the feed element to be part of the result set this to False

updated_after(element, dt_pivot, strict=True, recursive=False, include_feed=True)

source code 

Returns the list of elements which have been updated after the given date.

Keyword arguments: element -- atom feed or entry element dt_pivot -- datetime instance to compare to strict -- if True only accepts elements which are published strictly after the dt_pivot. if False elements which published date equals dt_pivot will be included in the result recursive -- if the element is a feed and recursive is True it will iterate through the feed entries as well include_feed -- if the element is a feed, recursive is True but you don't want the feed element to be part of the result set this to False

published_before(element, dt_pivot, strict=True, recursive=False, include_feed=True)

source code 

Returns the list of elements which have been published before the given date.

Keyword arguments: element -- atom feed or entry element dt_pivot -- datetime instance to compare to strict -- if True only accepts elements which are published strictly before the dt_pivot. if False elements which published date equals dt_pivot will be included in the result recursive -- if the element is a feed and recursive is True it will iterate through the feed entries as well include_feed -- if the element is a feed, recursive is True but you don't want the feed element to be part of the result set this to False

updated_before(element, dt_pivot, strict=True, recursive=False, include_feed=True)

source code 

Returns the list of elements which have been updated before the given date.

Keyword arguments: element -- atom feed or entry element dt_pivot -- datetime instance to compare to strict -- if True only accepts elements which are updated strictly before the dt_pivot. if False elements which updated date equals dt_pivot will be included in the result recursive -- if the element is a feed and recursive is True it will iterate through the feed entries as well include_feed -- if the element is a feed, recursive is True but you don't want the feed element to be part of the result set this to False

lookup_entry(element, id)

source code 
Returns the first entry matching the id provided in parameter

lookup_links(element, **kwargs)

source code 

returns a list of links matching the attributes passed as parameters. For instance:

lookup_links(entry, rel=u'alternate', type=u'text/html')

requires_summary(element)

source code 

Returns True if the entry requires an atom:summary to be added based on section 4.1.2 of RFC 4287.

Keyword argument: element -- entry element

requires_author(element)

source code 

Returns True if the entry requires an atom:author to be added based on section 4.1.2 of RFC 4287.

Keyword argument: element -- entry element

valid_categories(element, test_set, matching=None)

source code 
None

fetch_empty_authors(element, matching=None)

source code 

Return a list of atom:author elements which have an empty text for the children specified in 'matching' (which if not provided defaults to "name")

fetch_empty_authors(entry, matching=['name', 'email'])

Variables Details [hide private]

ATOM10_NS

None
Value:
u'http://www.w3.org/2005/Atom'                                         
      

ATOMPUB_NS

None
Value:
u'http://purl.org/atom/app#'                                           
      

XHTML1_NS

None
Value:
u'http://www.w3.org/1999/xhtml'                                        
      

THR_NS

None
Value:
u'http://purl.org/syndication/thread/1.0'                              
      

_xml_media_types

None
Value:
['text/xml',
 'application/xml',
 'text/xml-external-parsed-entity',
 'application/xml-external-parsed-entity',
 'application/xml-dtd']