python-feedgen 0.4.0 documentation

feedgen.ext.dc

«  feedgen.ext.base   ::   Contents   ::   feedgen.ext.podcast  »

Contents

feedgen.ext.dc

Extends the FeedGenerator to add Dubline Core Elements to the feeds.

Descriptions partly taken from http://dublincore.org/documents/dcmi-terms/#elements-coverage

copyright:2013, Lars Kiesow <lkiesow@uos.de>
license:FreeBSD and LGPL, see license.* for more details.
class feedgen.ext.dc.DcBaseExtension

Dublin Core Elements extension for podcasts.

dc_contributor(contributor=None, replace=False)

Get or set the dc:contributor which is an entity responsible for making contributions to the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-contributor

Parameters:
  • contributor – Contributor or list of contributors.
  • replace – Replace alredy set contributors (deault: False).
Returns:

List of contributors.

dc_coverage(coverage=None, replace=True)

Get or set the dc:coverage which indicated the spatial or temporal topic of the resource, the spatial applicability of the resource, or the jurisdiction under which the resource is relevant.

Spatial topic and spatial applicability may be a named place or a location specified by its geographic coordinates. Temporal topic may be a named period, date, or date range. A jurisdiction may be a named administrative entity or a geographic place to which the resource applies. Recommended best practice is to use a controlled vocabulary such as the Thesaurus of Geographic Names [TGN]. Where appropriate, named places or time periods can be used in preference to numeric identifiers such as sets of coordinates or date ranges.

References: [TGN] http://www.getty.edu/research/tools/vocabulary/tgn/index.html

Parameters:
  • coverage – Coverage of the feed.
  • replace – Replace already set coverage (default: True).
Returns:

Coverage of the feed.

dc_creator(creator=None, replace=False)

Get or set the dc:creator which is an entity primarily responsible for making the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-creator

Parameters:
  • creator – Creator or list of creators.
  • replace – Replace alredy set creators (deault: False).
Returns:

List of creators.

dc_date(date=None, replace=True)

Get or set the dc:date which describes a point or period of time associated with an event in the lifecycle of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-date

Parameters:
  • date – Date or list of dates.
  • replace – Replace alredy set dates (deault: True).
Returns:

List of dates.

dc_description(description=None, replace=True)

Get or set the dc:description which is an account of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-description

Parameters:
  • description – Description or list of descriptions.
  • replace – Replace alredy set descriptions (deault: True).
Returns:

List of descriptions.

dc_format(format=None, replace=True)

Get or set the dc:format which describes the file format, physical medium, or dimensions of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-format

Parameters:
  • format – Format of the resource or list of formats.
  • replace – Replace alredy set format (deault: True).
Returns:

Format of the resource.

dc_identifier(identifier=None, replace=True)

Get or set the dc:identifier which should be an unambiguous reference to the resource within a given context.

For more inidentifierion see: http://dublincore.org/documents/dcmi-terms/#elements-identifier

Parameters:
  • identifier – Identifier of the resource or list of identifiers.
  • replace – Replace alredy set identifier (deault: True).
Returns:

Identifiers of the resource.

dc_language(language=None, replace=True)

Get or set the dc:language which describes a language of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-language

Parameters:
  • language – Language or list of languages.
  • replace – Replace alredy set languages (deault: True).
Returns:

List of languages.

dc_publisher(publisher=None, replace=False)

Get or set the dc:publisher which is an entity responsible for making the resource available.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-publisher

Parameters:
  • publisher – Publisher or list of publishers.
  • replace – Replace alredy set publishers (deault: False).
Returns:

List of publishers.

dc_relation(relation=None, replace=False)

Get or set the dc:relation which describes a related ressource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-relation

Parameters:
  • relation – Relation or list of relations.
  • replace – Replace alredy set relations (deault: False).
Returns:

List of relations.

dc_rights(rights=None, replace=False)

Get or set the dc:rights which may contain information about rights held in and over the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-rights

Parameters:
  • rights – Rights information or list of rights information.
  • replace – Replace alredy set rightss (deault: False).
Returns:

List of rights information.

dc_source(source=None, replace=False)

Get or set the dc:source which is a related resource from which the described resource is derived.

The described resource may be derived from the related resource in whole or in part. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-source

Parameters:
  • source – Source or list of sources.
  • replace – Replace alredy set sources (deault: False).
Returns:

List of sources.

dc_subject(subject=None, replace=False)

Get or set the dc:subject which describes the topic of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-subject

Parameters:
  • subject – Subject or list of subjects.
  • replace – Replace alredy set subjects (deault: False).
Returns:

List of subjects.

dc_title(title=None, replace=True)

Get or set the dc:title which is a name given to the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-title

Parameters:
  • title – Title or list of titles.
  • replace – Replace alredy set titles (deault: False).
Returns:

List of titles.

dc_type(type=None, replace=False)

Get or set the dc:type which describes the nature or genre of the resource.

For more information see: http://dublincore.org/documents/dcmi-terms/#elements-type

Parameters:
  • type – Type or list of types.
  • replace – Replace alredy set types (deault: False).
Returns:

List of types.

extend_atom(atom_feed)

Extend an Atom feed with the set DC fields.

Parameters:atom_feed – The feed root element
Returns:The feed root element
extend_rss(rss_feed)

Extend a RSS feed with the set DC fields.

Parameters:rss_feed – The feed root element
Returns:The feed root element.
class feedgen.ext.dc.DcEntryExtension

Dublin Core Elements extension for podcasts.

extend_atom(entry)

Add dc elements to an atom item. Alters the item itself.

Parameters:entry – An atom entry element.
Returns:The entry element.
extend_rss(item)

Add dc elements to a RSS item. Alters the item itself.

Parameters:item – A RSS item element.
Returns:The item element.
class feedgen.ext.dc.DcExtension

Dublin Core Elements extension for podcasts.

«  feedgen.ext.base   ::   Contents   ::   feedgen.ext.podcast  »