python-feedgen/api.feed.html

968 lines
50 KiB
HTML
Raw Normal View History

2013-05-05 22:12:47 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2017-10-14 21:48:00 +02:00
<title>feedgen.feed &#8212; python-feedgen 0.6.1 documentation</title>
2013-05-05 22:12:47 +02:00
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
2017-10-14 21:48:00 +02:00
VERSION: '0.6.1',
2013-05-05 22:12:47 +02:00
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
2017-10-14 21:48:00 +02:00
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
2013-05-05 22:12:47 +02:00
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
2013-05-05 22:12:47 +02:00
<link rel="next" title="feedgen.entry" href="api.entry.html" />
<link rel="prev" title="API Documentation" href="api.html" />
</head>
<body role="document">
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
2017-10-14 21:48:00 +02:00
<span>python-feedgen 0.6.1 documentation</span></a></h1>
2013-05-05 22:12:47 +02:00
<h2 class="heading"><span>feedgen.feed</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
2013-05-05 22:12:47 +02:00
<p>
«&#160;&#160;<a href="api.html">API Documentation</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.entry.html">feedgen.entry</a>&#160;&#160;»
</p>
</div>
<div class="content">
2016-09-04 21:54:21 +02:00
<script type=application/javascript src=_static/theme_extras.js></script>
<div class="apititle"><b>Contents</b></div>
2013-05-05 22:12:47 +02:00
<div class="apitoc"></div><span class="target" id="module-feedgen.feed"></span><div class="section" id="feedgen-feed">
<h1>feedgen.feed<a class="headerlink" href="#feedgen-feed" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body">2013-2016, Lars Kiesow &lt;<a class="reference external" href="mailto:lkiesow&#37;&#52;&#48;uos&#46;de">lkiesow<span>&#64;</span>uos<span>&#46;</span>de</a>&gt;</td>
2013-05-05 22:12:47 +02:00
</tr>
<tr class="field-even field"><th class="field-name">license:</th><td class="field-body">FreeBSD and LGPL, see license.* for more details.</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="feedgen.feed.FeedGenerator">
<em class="property">class </em><code class="descclassname">feedgen.feed.</code><code class="descname">FeedGenerator</code><a class="headerlink" href="#feedgen.feed.FeedGenerator" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>FeedGenerator for generating ATOM and RSS feeds.</p>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.add_entry">
<code class="descname">add_entry</code><span class="sig-paren">(</span><em>feedEntry=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.add_entry" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>This method will add a new entry to the feed. If the feedEntry
argument is omittet a new Entry object is created automatically. This
is the prefered way to add new entries to a feed.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>feedEntry</strong> &#8211; FeedEntry object to add.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">FeedEntry object created or passed to this function.</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">...</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">feedgen</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">entry</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;First feed entry&#39;</span><span class="p">)</span>
</pre></div>
2013-05-05 22:12:47 +02:00
</div>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.add_item">
<code class="descname">add_item</code><span class="sig-paren">(</span><em>item=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.add_item" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>This method will add a new item to the feed. If the item argument is
omittet a new FeedEntry object is created automatically. This is just
another name for add_entry(...)</p>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.atom_file">
<code class="descname">atom_file</code><span class="sig-paren">(</span><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_file" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Generates an ATOM feed and write the resulting XML to a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>filename</strong> &#8211; Name of file to write or a file-like object or a URL.</li>
2013-05-05 22:12:47 +02:00
<li><strong>extensions</strong> &#8211; Enable or disable the loaded extensions for the xml
generation (default: enabled).</li>
2016-09-04 21:54:21 +02:00
<li><strong>pretty</strong> &#8211; If the feed should be split into multiple lines and
properly indented.</li>
<li><strong>encoding</strong> &#8211; Encoding used in the XML file (default: UTF-8).</li>
<li><strong>xml_declaration</strong> &#8211; If an XML declaration should be added to the
output (Default: enabled).</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.atom_str">
<code class="descname">atom_str</code><span class="sig-paren">(</span><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_str" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Generates an ATOM feed and returns the feed XML as string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>pretty</strong> &#8211; If the feed should be split into multiple lines and
properly indented.</li>
<li><strong>extensions</strong> &#8211; Enable or disable the loaded extensions for the xml
generation (default: enabled).</li>
2016-09-04 21:54:21 +02:00
<li><strong>encoding</strong> &#8211; Encoding used in the XML file (default: UTF-8).</li>
<li><strong>xml_declaration</strong> &#8211; If an XML declaration should be added to the
output (Default: enabled).</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">String representation of the ATOM feed.</p>
</td>
</tr>
</tbody>
</table>
2016-09-04 21:54:21 +02:00
<p><strong>Return type:</strong> The return type may vary between different Python
versions and your encoding parameters passed to this method. For
details have a look at the <a class="reference external" href="https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring">lxml documentation</a></p>
2013-05-05 22:12:47 +02:00
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.author">
<code class="descname">author</code><span class="sig-paren">(</span><em>author=None</em>, <em>replace=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.author" title="Permalink to this definition"></a></dt>
<dd><p>Get or set author data. An author element is a dictionary containing
a name, an email address and a URI. Name is mandatory for ATOM, email
is mandatory for RSS.</p>
2013-05-15 01:44:34 +02:00
<p>This method can be called with:</p>
<ul class="simple">
<li>the fields of an author as keyword arguments</li>
<li>the fields of an author as a dictionary</li>
<li>a list of dictionaries containing the author fields</li>
</ul>
<p>An author has the following fields:</p>
<ul class="simple">
<li><em>name</em> conveys a human-readable name for the person.</li>
<li><em>uri</em> contains a home page for the person.</li>
<li><em>email</em> contains an email address for the person.</li>
</ul>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>author</strong> &#8211; Dictionary or list of dictionaries with author data.</li>
<li><strong>replace</strong> &#8211; Add or replace old data.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of authors as dictionaries.</p>
</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
2013-05-05 22:12:47 +02:00
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
2016-09-04 21:54:21 +02:00
<span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">([{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;Mr. X&#39;</span><span class="p">},{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;Max&#39;</span><span class="p">}])</span>
2013-05-05 22:12:47 +02:00
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;},</span>
<span class="go"> {&#39;name&#39;:&#39;John Doe&#39;}, {&#39;name&#39;:&#39;Max&#39;}]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">,</span>
<span class="go"> replace=True)</span>
2013-05-05 22:12:47 +02:00
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.category">
<code class="descname">category</code><span class="sig-paren">(</span><em>category=None</em>, <em>replace=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.category" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set categories that the feed belongs to.</p>
2013-05-13 15:50:08 +02:00
<p>This method can be called with:</p>
<ul class="simple">
<li>the fields of a category as keyword arguments</li>
<li>the fields of a category as a dictionary</li>
<li>a list of dictionaries containing the category fields</li>
</ul>
<p>A categories has the following fields:</p>
<ul class="simple">
<li><em>term</em> identifies the category</li>
<li><em>scheme</em> identifies the categorization scheme via a URI.</li>
<li><em>label</em> provides a human-readable label for display</li>
</ul>
<p>If a label is present it is used for the RSS feeds. Otherwise the term
is used. The scheme is used for the domain attribute in RSS.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>link</strong> &#8211; Dict or list of dicts with data.</li>
<li><strong>replace</strong> &#8211; Add or replace old data.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of category data.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.cloud">
<code class="descname">cloud</code><span class="sig-paren">(</span><em>domain=None</em>, <em>port=None</em>, <em>path=None</em>, <em>registerProcedure=None</em>, <em>protocol=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.cloud" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the cloud data of the feed. It is an RSS only attribute.
It specifies a web service that supports the rssCloud interface which
can be implemented in HTTP-POST, XML-RPC or SOAP 1.1.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>domain</strong> &#8211; The domain where the webservice can be found.</li>
<li><strong>port</strong> &#8211; The port the webservice listens to.</li>
<li><strong>path</strong> &#8211; The path of the webservice.</li>
<li><strong>registerProcedure</strong> &#8211; The procedure to call.</li>
<li><strong>protocol</strong> &#8211; Can be either HTTP-POST, XML-RPC or SOAP 1.1.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Dictionary containing the cloud data.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.contributor">
<code class="descname">contributor</code><span class="sig-paren">(</span><em>contributor=None</em>, <em>replace=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.contributor" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the contributor data of the feed. This is an ATOM only
value.</p>
<p>This method can be called with:
- the fields of an contributor as keyword arguments
- the fields of an contributor as a dictionary
- a list of dictionaries containing the contributor fields</p>
<p>An contributor has the following fields:
- <em>name</em> conveys a human-readable name for the person.
- <em>uri</em> contains a home page for the person.
- <em>email</em> contains an email address for the person.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>contributor</strong> &#8211; Dictionary or list of dictionaries with contributor
data.</li>
2013-05-05 22:12:47 +02:00
<li><strong>replace</strong> &#8211; Add or replace old data.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of contributors as dictionaries.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.copyright">
<code class="descname">copyright</code><span class="sig-paren">(</span><em>copyright=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.copyright" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the copyright notice for content in the channel. This RSS
value will also set the atom:rights value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>copyright</strong> &#8211; The copyright notice.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The copyright notice.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.description">
<code class="descname">description</code><span class="sig-paren">(</span><em>description=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.description" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set and get the description of the feed. This is an RSS only element
which is a phrase or sentence describing the channel. It is mandatory
for RSS feeds. It is roughly the same as atom:subtitle. Thus setting
this will also set atom:subtitle.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>description</strong> &#8211; Description of the channel.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Description of the channel.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.docs">
<code class="descname">docs</code><span class="sig-paren">(</span><em>docs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.docs" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the docs value of the feed. This is an RSS only value. It
is a URL that points to the documentation for the format used in the
RSS file. It is probably a pointer to [1]. It is for people who might
stumble across an RSS file on a Web server 25 years from now and wonder
what it is.</p>
2013-05-05 22:12:47 +02:00
<p>[1]: <a class="reference external" href="http://www.rssboard.org/rss-specification">http://www.rssboard.org/rss-specification</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>docs</strong> &#8211; URL of the format documentation.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">URL of the format documentation.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.entry">
<code class="descname">entry</code><span class="sig-paren">(</span><em>entry=None</em>, <em>replace=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.entry" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set feed entries. Use the add_entry() method instead to
automatically create the FeedEntry objects.</p>
<p>This method takes both a single FeedEntry object or a list of objects.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> &#8211; FeedEntry object or list of FeedEntry objects.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List ob all feed entries.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.generator">
<code class="descname">generator</code><span class="sig-paren">(</span><em>generator=None</em>, <em>version=None</em>, <em>uri=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.generator" title="Permalink to this definition"></a></dt>
<dd><p>Get or the generator of the feed which identifies the software used
to generate the feed, for debugging and other purposes. Both the uri
and version attributes are optional and only available in the ATOM
feed.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>generator</strong> &#8211; Software used to create the feed.</li>
<li><strong>version</strong> &#8211; Version of the software.</li>
<li><strong>uri</strong> &#8211; URI the software can be found.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.icon">
<code class="descname">icon</code><span class="sig-paren">(</span><em>icon=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.icon" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the icon of the feed which is a small image which
provides iconic visual identification for the feed. Icons should be
square. This is an ATOM only value.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>icon</strong> &#8211; URI of the feeds icon.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">URI of the feeds icon.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.id">
<code class="descname">id</code><span class="sig-paren">(</span><em>id=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.id" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the feed id which identifies the feed using a universally
unique and permanent URI. If you have a long-term, renewable lease on
your Internet domain name, then you can feel free to use your website&#8217;s
address. This field is for ATOM only. It is mandatory for ATOM.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; New Id of the ATOM feed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Id of the feed.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.image">
<code class="descname">image</code><span class="sig-paren">(</span><em>url=None</em>, <em>title=None</em>, <em>link=None</em>, <em>width=None</em>, <em>height=None</em>, <em>description=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.image" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set the image of the feed. This element is roughly equivalent to
atom:logo.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>url</strong> &#8211; The URL of a GIF, JPEG or PNG image.</li>
<li><strong>title</strong> &#8211; Describes the image. The default value is the feeds
title.</li>
2013-05-05 22:12:47 +02:00
<li><strong>link</strong> &#8211; URL of the site the image will link to. The default is to
use the feeds first altertate link.</li>
<li><strong>width</strong> &#8211; Width of the image in pixel. The maximum is 144.</li>
<li><strong>height</strong> &#8211; The height of the image. The maximum is 400.</li>
<li><strong>description</strong> &#8211; Title of the link.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Data of the image as dictionary.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.item">
<code class="descname">item</code><span class="sig-paren">(</span><em>item=None</em>, <em>replace=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.item" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set feed items. This is just another name for entry(...)</p>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.language">
<code class="descname">language</code><span class="sig-paren">(</span><em>language=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.language" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the language of the feed. It indicates the language the
channel is written in. This allows aggregators to group all Italian
language sites, for example, on a single page. This is an RSS only
field. However, this value will also be used to set the xml:lang
property of the ATOM feed node.
2013-05-05 22:12:47 +02:00
The value should be an IETF language tag.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>language</strong> &#8211; Language of the feed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Language of the feed.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.lastBuildDate">
<code class="descname">lastBuildDate</code><span class="sig-paren">(</span><em>lastBuildDate=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.lastBuildDate" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set or get the lastBuildDate value which indicates the last time the
content of the channel changed.</p>
<p>The value can either be a string which will automatically be parsed or
a datetime.datetime object. In any case it is necessary that the value
2013-05-05 22:12:47 +02:00
include timezone information.</p>
<p>This will set both atom:updated and rss:lastBuildDate.</p>
2013-05-15 01:44:34 +02:00
<dl class="docutils">
<dt>Default value</dt>
<dd>If not set, lastBuildDate has as value the current date and time.</dd>
</dl>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>lastBuildDate</strong> &#8211; The modification date.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Modification date as datetime.datetime</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.link">
<code class="descname">link</code><span class="sig-paren">(</span><em>link=None</em>, <em>replace=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.link" title="Permalink to this definition"></a></dt>
<dd><p>Get or set link data. An link element is a dict with the fields
href, rel, type, hreflang, title, and length. Href is mandatory for
ATOM.</p>
2016-09-04 21:54:21 +02:00
<p>This method can be called with:</p>
<ul class="simple">
<li>the fields of a link as keyword arguments</li>
<li>the fields of a link as a dictionary</li>
<li>a list of dictionaries containing the link fields</li>
</ul>
2013-05-05 22:12:47 +02:00
<p>A link has the following fields:</p>
<ul>
<li><p class="first"><em>href</em> is the URI of the referenced resource (typically a Web page)</p>
</li>
<li><p class="first"><em>rel</em> contains a single link relationship type. It can be a full URI,
or one of the following predefined values (default=alternate):</p>
<blockquote>
<div><ul class="simple">
<li><em>alternate</em> an alternate representation of the entry or feed, for
example a permalink to the html version of the entry, or the
front page of the weblog.</li>
2013-05-05 22:12:47 +02:00
<li><em>enclosure</em> a related resource which is potentially large in size
and might require special handling, for example an audio or video
recording.</li>
<li><em>related</em> an document related to the entry or feed.</li>
<li><em>self</em> the feed itself.</li>
<li><em>via</em> the source of the information provided in the entry.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>type</em> indicates the media type of the resource.</p>
</li>
<li><p class="first"><em>hreflang</em> indicates the language of the referenced resource.</p>
</li>
<li><p class="first"><em>title</em> human readable information about the link, typically for
display purposes.</p>
</li>
<li><p class="first"><em>length</em> the length of the resource, in bytes.</p>
</li>
</ul>
<p>RSS only supports one link with URL only.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
2016-09-04 21:54:21 +02:00
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2013-05-05 22:12:47 +02:00
<li><strong>link</strong> &#8211; Dict or list of dicts with data.</li>
2016-09-04 21:54:21 +02:00
<li><strong>replace</strong> &#8211; If old links are to be replaced (default: False)</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
2016-09-04 21:54:21 +02:00
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Current set of link data</p>
</td>
</tr>
2013-05-05 22:12:47 +02:00
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">link</span><span class="p">(</span> <span class="n">href</span><span class="o">=</span><span class="s1">&#39;http://example.com/&#39;</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">&#39;self&#39;</span><span class="p">)</span>
2013-05-05 22:12:47 +02:00
<span class="go">[{&#39;href&#39;:&#39;http://example.com/&#39;, &#39;rel&#39;:&#39;self&#39;}]</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.load_extension">
<code class="descname">load_extension</code><span class="sig-paren">(</span><em>name</em>, <em>atom=True</em>, <em>rss=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.load_extension" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Load a specific extension by name.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> &#8211; Name of the extension to load.</li>
<li><strong>atom</strong> &#8211; If the extension should be used for ATOM feeds.</li>
<li><strong>rss</strong> &#8211; If the extension should be used for RSS feeds.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.logo">
<code class="descname">logo</code><span class="sig-paren">(</span><em>logo=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.logo" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the logo of the feed which is a larger image which
provides visual identification for the feed. Images should be twice as
wide as they are tall. This is an ATOM value but will also set the
rss:image value.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>logo</strong> &#8211; Logo of the feed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Logo of the feed.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.managingEditor">
<code class="descname">managingEditor</code><span class="sig-paren">(</span><em>managingEditor=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.managingEditor" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the value for managingEditor which is the email address
for person responsible for editorial content. This is a RSS only
value.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>managingEditor</strong> &#8211; Email adress of the managing editor.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Email adress of the managing editor.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.pubDate">
<code class="descname">pubDate</code><span class="sig-paren">(</span><em>pubDate=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.pubDate" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set or get the publication date for the content in the channel. For
example, the New York Times publishes on a daily basis, the publication
date flips once every 24 hours. That&#8217;s when the pubDate of the channel
changes.</p>
<p>The value can either be a string which will automatically be parsed or
a datetime.datetime object. In any case it is necessary that the value
2013-05-05 22:12:47 +02:00
include timezone information.</p>
<p>This will set both atom:updated and rss:lastBuildDate.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pubDate</strong> &#8211; The publication date.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Publication date as datetime.datetime</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.rating">
<code class="descname">rating</code><span class="sig-paren">(</span><em>rating=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.rating" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set and get the PICS rating for the channel. It is an RSS only
value.</p>
</dd></dl>
2016-09-04 21:54:21 +02:00
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.register_extension">
<code class="descname">register_extension</code><span class="sig-paren">(</span><em>namespace</em>, <em>extension_class_feed=None</em>, <em>extension_class_entry=None</em>, <em>atom=True</em>, <em>rss=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.register_extension" title="Permalink to this definition"></a></dt>
2016-09-04 21:54:21 +02:00
<dd><p>Registers an extension by class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>namespace</strong> &#8211; namespace for the extension</li>
<li><strong>extension_class_feed</strong> &#8211; Class of the feed extension to load.</li>
<li><strong>extension_class_entry</strong> &#8211; Class of the entry extension to load</li>
<li><strong>atom</strong> &#8211; If the extension should be used for ATOM feeds.</li>
<li><strong>rss</strong> &#8211; If the extension should be used for RSS feeds.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
2013-05-05 22:12:47 +02:00
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.remove_entry">
<code class="descname">remove_entry</code><span class="sig-paren">(</span><em>entry</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.remove_entry" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Remove a single entry from the feed. This method accepts both the
FeedEntry object to remove or the index of the entry as argument.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> &#8211; Entry or index of entry to remove.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.remove_item">
<code class="descname">remove_item</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.remove_item" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Remove a single item from the feed. This is another name for
remove_entry.</p>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.rights">
<code class="descname">rights</code><span class="sig-paren">(</span><em>rights=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.rights" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the rights value of the feed which conveys information
about rights, e.g. copyrights, held in and over the feed. This ATOM
value will also set rss:copyright.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rights</strong> &#8211; Rights information of the feed.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.rss_file">
<code class="descname">rss_file</code><span class="sig-paren">(</span><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_file" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Generates an RSS feed and write the resulting XML to a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>filename</strong> &#8211; Name of file to write or a file-like object or a URL.</li>
2013-05-05 22:12:47 +02:00
<li><strong>extensions</strong> &#8211; Enable or disable the loaded extensions for the xml
generation (default: enabled).</li>
2016-09-04 21:54:21 +02:00
<li><strong>pretty</strong> &#8211; If the feed should be split into multiple lines and
properly indented.</li>
<li><strong>encoding</strong> &#8211; Encoding used in the XML file (default: UTF-8).</li>
<li><strong>xml_declaration</strong> &#8211; If an XML declaration should be added to the
output (Default: enabled).</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.rss_str">
<code class="descname">rss_str</code><span class="sig-paren">(</span><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_str" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Generates an RSS feed and returns the feed XML as string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>pretty</strong> &#8211; If the feed should be split into multiple lines and
properly indented.</li>
<li><strong>extensions</strong> &#8211; Enable or disable the loaded extensions for the xml
generation (default: enabled).</li>
2016-09-04 21:54:21 +02:00
<li><strong>encoding</strong> &#8211; Encoding used in the XML file (default: UTF-8).</li>
<li><strong>xml_declaration</strong> &#8211; If an XML declaration should be added to the
output (Default: enabled).</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">String representation of the RSS feed.</p>
</td>
</tr>
</tbody>
</table>
2016-09-04 21:54:21 +02:00
<p><strong>Return type:</strong> The return type may vary between different Python
versions and your encoding parameters passed to this method. For
details have a look at the <a class="reference external" href="https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring">lxml documentation</a></p>
2013-05-05 22:12:47 +02:00
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.skipDays">
<code class="descname">skipDays</code><span class="sig-paren">(</span><em>days=None</em>, <em>replace=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.skipDays" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the value of skipDays, a hint for aggregators telling
them which days they can skip This is an RSS only value.</p>
<p>This method can be called with a day name or a list of day names. The
days are represented as strings from &#8216;Monday&#8217; to &#8216;Sunday&#8217;.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>hours</strong> &#8211; List of days the feedreaders should not check the feed.</li>
<li><strong>replace</strong> &#8211; Add or replace old data.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of days the feedreaders should not check the feed.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.skipHours">
<code class="descname">skipHours</code><span class="sig-paren">(</span><em>hours=None</em>, <em>replace=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.skipHours" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the value of skipHours, a hint for aggregators telling
them which hours they can skip. This is an RSS only value.</p>
<p>This method can be called with an hour or a list of hours. The hours
are represented as integer values from 0 to 23.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>hours</strong> &#8211; List of hours the feedreaders should not check the feed.</li>
<li><strong>replace</strong> &#8211; Add or replace old data.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of hours the feedreaders should not check the feed.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.subtitle">
<code class="descname">subtitle</code><span class="sig-paren">(</span><em>subtitle=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.subtitle" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the subtitle value of the cannel which contains a
human-readable description or subtitle for the feed. This ATOM property
will also set the value for rss:description.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>subtitle</strong> &#8211; The subtitle of the feed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The subtitle of the feed.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.textInput">
<code class="descname">textInput</code><span class="sig-paren">(</span><em>title=None</em>, <em>description=None</em>, <em>name=None</em>, <em>link=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.textInput" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the value of textInput. This is an RSS only field. The
purpose of the &lt;textInput&gt; element is something of a mystery. You can
use it to specify a search engine box. Or to allow a reader to provide
2013-05-05 22:12:47 +02:00
feedback. Most aggregators ignore it.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>title</strong> &#8211; The label of the Submit button in the text input area.</li>
<li><strong>description</strong> &#8211; Explains the text input area.</li>
<li><strong>name</strong> &#8211; The name of the text object in the text input area.</li>
<li><strong>link</strong> &#8211; The URL of the CGI script that processes text input
requests.</li>
2013-05-05 22:12:47 +02:00
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Dictionary containing textInput values.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.title">
<code class="descname">title</code><span class="sig-paren">(</span><em>title=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.title" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the title value of the feed. It should contain a human
readable title for the feed. Often the same as the title of the
associated website. Title is mandatory for both ATOM and RSS and should
not be blank.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>title</strong> &#8211; The new title of the feed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The feeds title.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.ttl">
<code class="descname">ttl</code><span class="sig-paren">(</span><em>ttl=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.ttl" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Get or set the ttl value. It is an RSS only element. ttl stands for
time to live. It&#8217;s a number of minutes that indicates how long a
channel can be cached before refreshing from the source.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ttl</strong> &#8211; Integer value indicating how long the channel may be
cached.</td>
2013-05-05 22:12:47 +02:00
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Time to live.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.updated">
<code class="descname">updated</code><span class="sig-paren">(</span><em>updated=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.updated" title="Permalink to this definition"></a></dt>
2013-05-05 22:12:47 +02:00
<dd><p>Set or get the updated value which indicates the last time the feed
was modified in a significant way.</p>
<p>The value can either be a string which will automatically be parsed or
a datetime.datetime object. In any case it is necessary that the value
2013-05-05 22:12:47 +02:00
include timezone information.</p>
<p>This will set both atom:updated and rss:lastBuildDate.</p>
2013-05-15 01:44:34 +02:00
<dl class="docutils">
<dt>Default value</dt>
<dd>If not set, updated has as value the current date and time.</dd>
</dl>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>updated</strong> &#8211; The modification date.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Modification date as datetime.datetime</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.webMaster">
<code class="descname">webMaster</code><span class="sig-paren">(</span><em>webMaster=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.webMaster" title="Permalink to this definition"></a></dt>
<dd><p>Get and set the value of webMaster, which represents the email
address for the person responsible for technical issues relating to the
feed. This is an RSS only value.</p>
2013-05-05 22:12:47 +02:00
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>webMaster</strong> &#8211; Email address of the webmaster.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Email address of the webmaster.</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
2013-05-05 22:12:47 +02:00
<p>
«&#160;&#160;<a href="api.html">API Documentation</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.entry.html">feedgen.entry</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
2017-10-14 21:48:00 +02:00
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2.
2013-05-05 22:12:47 +02:00
</div>
</body>
</html>