576 lines
No EOL
29 KiB
HTML
576 lines
No EOL
29 KiB
HTML
|
||
<!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" />
|
||
<title>feedgen.entry — python-feedgen 0.7.0 documentation</title>
|
||
<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: './',
|
||
VERSION: '0.7.0',
|
||
COLLAPSE_INDEX: false,
|
||
FILE_SUFFIX: '.html',
|
||
HAS_SOURCE: true,
|
||
SOURCELINK_SUFFIX: '.txt'
|
||
};
|
||
</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" />
|
||
<link rel="next" title="feedgen.util" href="api.util.html" />
|
||
<link rel="prev" title="feedgen.feed" href="api.feed.html" />
|
||
</head>
|
||
<body>
|
||
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
|
||
<span>python-feedgen 0.7.0 documentation</span></a></h1>
|
||
<h2 class="heading"><span>feedgen.entry</span></h2>
|
||
</div>
|
||
<div class="topnav" role="navigation" aria-label="top navigation">
|
||
|
||
<p>
|
||
«  <a href="api.feed.html">feedgen.feed</a>
|
||
  ::  
|
||
<a class="uplink" href="index.html">Contents</a>
|
||
  ::  
|
||
<a href="api.util.html">feedgen.util</a>  »
|
||
</p>
|
||
|
||
</div>
|
||
<div class="content">
|
||
|
||
|
||
<script type=application/javascript src=_static/theme_extras.js></script>
|
||
<div class="apititle"><b>Contents</b></div>
|
||
<div class="apitoc"></div><span class="target" id="module-feedgen.entry"></span><div class="section" id="feedgen-entry">
|
||
<h1>feedgen.entry<a class="headerlink" href="#feedgen-entry" 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, Lars Kiesow <<a class="reference external" href="mailto:lkiesow%40uos.de">lkiesow<span>@</span>uos<span>.</span>de</a>></td>
|
||
</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.entry.FeedEntry">
|
||
<em class="property">class </em><code class="descclassname">feedgen.entry.</code><code class="descname">FeedEntry</code><a class="headerlink" href="#feedgen.entry.FeedEntry" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>FeedEntry call representing an ATOM feeds entry node or an RSS feeds item
|
||
node.</p>
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.atom_entry">
|
||
<code class="descname">atom_entry</code><span class="sig-paren">(</span><em>extensions=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.atom_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create an ATOM entry and return it.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.author" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set author data. An author element is a dict containing a
|
||
name, an email address and a uri. Name is mandatory for ATOM, email is
|
||
mandatory for RSS.</p>
|
||
<p>This method can be called with:
|
||
- the fields of an author as keyword arguments
|
||
- the fields of an author as a dictionary
|
||
- a list of dictionaries containing the author fields</p>
|
||
<p>An author 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 last simple">
|
||
<li><strong>author</strong> – Dict or list of dicts with author data.</li>
|
||
<li><strong>replace</strong> – Add or replace old data.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Example:</p>
|
||
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">author</span><span class="p">({</span><span class="s1">'name'</span><span class="p">:</span><span class="s1">'John Doe'</span><span class="p">,</span> <span class="s1">'email'</span><span class="p">:</span><span class="s1">'jdoe@example.com'</span><span class="p">})</span>
|
||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'}]</span>
|
||
|
||
<span class="gp">>>> </span><span class="n">author</span><span class="p">([{</span><span class="s1">'name'</span><span class="p">:</span> <span class="s1">'Mr. X'</span><span class="p">},</span> <span class="p">{</span><span class="s1">'name'</span><span class="p">:</span> <span class="s1">'Max'</span><span class="p">}])</span>
|
||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'},</span>
|
||
<span class="go"> {'name':'John Doe'}, {'name':'Max'}]</span>
|
||
|
||
<span class="gp">>>> </span><span class="n">author</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">'John Doe'</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s1">'jdoe@example.com'</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'}]</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.category" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set categories that the entry belongs to.</p>
|
||
<p>This method can be called with:
|
||
- the fields of a category as keyword arguments
|
||
- the fields of a category as a dictionary
|
||
- a list of dictionaries containing the category fields</p>
|
||
<p>A categories has the following fields:
|
||
- <em>term</em> identifies the category
|
||
- <em>scheme</em> identifies the categorization scheme via a URI.
|
||
- <em>label</em> provides a human-readable label for display</p>
|
||
<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>
|
||
<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>category</strong> – Dict or list of dicts with data.</li>
|
||
<li><strong>replace</strong> – 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.entry.FeedEntry.comments">
|
||
<code class="descname">comments</code><span class="sig-paren">(</span><em>comments=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.comments" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the the value of comments which is the url of the
|
||
comments page for the item. This is a RSS only 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>comments</strong> – URL to the comments page.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">URL to the comments page.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.content">
|
||
<code class="descname">content</code><span class="sig-paren">(</span><em>content=None</em>, <em>src=None</em>, <em>type=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.content" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the cntent of the entry which contains or links to the
|
||
complete content of the entry. Content must be provided for ATOM
|
||
entries if there is no alternate link, and should be provided if there
|
||
is no summary. If the content is set (not linked) it will also set
|
||
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"><ul class="first simple">
|
||
<li><strong>content</strong> – The content of the feed entry.</li>
|
||
<li><strong>src</strong> – Link to the entries content.</li>
|
||
<li><strong>type</strong> – If type is CDATA content would not be escaped.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Content element of the entry.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.contributor" title="Permalink to this definition">¶</a></dt>
|
||
<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> – Dictionary or list of dictionaries with contributor
|
||
data.</li>
|
||
<li><strong>replace</strong> – 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.entry.FeedEntry.description">
|
||
<code class="descname">description</code><span class="sig-paren">(</span><em>description=None</em>, <em>isSummary=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.description" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the description value which is the item synopsis.
|
||
Description is an RSS only element. For ATOM feeds it is split in
|
||
summary and content. The isSummary parameter can be used to control
|
||
which ATOM value is set when setting 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"><ul class="first simple">
|
||
<li><strong>description</strong> – Description of the entry.</li>
|
||
<li><strong>isSummary</strong> – If the description should be used as content or
|
||
summary.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The entries description.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.enclosure">
|
||
<code class="descname">enclosure</code><span class="sig-paren">(</span><em>url=None</em>, <em>length=None</em>, <em>type=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.enclosure" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the value of enclosure which describes a media object
|
||
that is attached to the item. This is a RSS only value which is
|
||
represented by link(rel=enclosure) in ATOM. ATOM feeds can furthermore
|
||
contain several enclosures while RSS may contain only one. That is why
|
||
this method, if repeatedly called, will add more than one enclosures to
|
||
the feed. However, only the last one is used for RSS.</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> – URL of the media object.</li>
|
||
<li><strong>length</strong> – Size of the media in bytes.</li>
|
||
<li><strong>type</strong> – Mimetype of the linked media.</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 enclosure element.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.guid">
|
||
<code class="descname">guid</code><span class="sig-paren">(</span><em>guid=None</em>, <em>permalink=False</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.guid" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the entries guid which is a string that uniquely
|
||
identifies the item. This will also set atom:id.</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>guid</strong> – Id of the entry.</li>
|
||
<li><strong>permalink</strong> – If this is a permanent identifier for this item</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Id and permalink setting of the entry.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.id" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the entry id which identifies the entry using a
|
||
universally unique and permanent URI. Two entries in a feed can have
|
||
the same value for id if they represent the same entry at different
|
||
points in time. This method will also set rss:guid with permalink set
|
||
to False. Id is mandatory for an ATOM entry.</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> – New Id of the entry.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Id of the entry.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.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>
|
||
<p>This method can be called with:
|
||
- the fields of a link as keyword arguments
|
||
- the fields of a link as a dictionary
|
||
- a list of dictionaries containing the link fields</p>
|
||
<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>
|
||
<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 nothing but a URL. So for the RSS link
|
||
element the last link with rel=alternate is used.</p>
|
||
<p>RSS also supports one enclusure element per entry which is covered by
|
||
the link element in ATOM feed entries. So for the RSS enclusure element
|
||
the last link with rel=enclosure is used.</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>link</strong> – Dict or list of dicts with data.</li>
|
||
<li><strong>replace</strong> – 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 link data.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.load_extension" title="Permalink to this definition">¶</a></dt>
|
||
<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> – Name of the extension to load.</li>
|
||
<li><strong>atom</strong> – If the extension should be used for ATOM feeds.</li>
|
||
<li><strong>rss</strong> – If the extension should be used for RSS feeds.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.pubDate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the pubDate of the entry which indicates when the entry
|
||
was published. This method is just another name for the published(…)
|
||
method.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.pubdate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the pubDate of the entry which indicates when the entry
|
||
was published. This method is just another name for the published(…)
|
||
method.</p>
|
||
<p>pubdate(…) is deprected and may be removed in feedgen ≥ 0.8. Use
|
||
pubDate(…) instead.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.published">
|
||
<code class="descname">published</code><span class="sig-paren">(</span><em>published=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.published" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Set or get the published value which contains the time of the initial
|
||
creation or first availability of the entry.</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
|
||
include timezone information.</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>published</strong> – The creation date.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Creation date as datetime.datetime</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.register_extension">
|
||
<code class="descname">register_extension</code><span class="sig-paren">(</span><em>namespace</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.entry.FeedEntry.register_extension" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Register a specific extension by classes to a namespace.</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> – namespace for the extension</li>
|
||
<li><strong>extension_class_entry</strong> – Class of the entry extension to load.</li>
|
||
<li><strong>atom</strong> – If the extension should be used for ATOM feeds.</li>
|
||
<li><strong>rss</strong> – If the extension should be used for RSS feeds.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.rights" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the rights value of the entry which conveys information
|
||
about rights, e.g. copyrights, held in and over the entry. This ATOM
|
||
value will also set rss:copyright.</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>rights</strong> – Rights information of the feed.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Rights information of the feed.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.rss_entry">
|
||
<code class="descname">rss_entry</code><span class="sig-paren">(</span><em>extensions=True</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.rss_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a RSS item and return it.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.summary">
|
||
<code class="descname">summary</code><span class="sig-paren">(</span><em>summary=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.summary" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the summary element of an entry which conveys a short
|
||
summary, abstract, or excerpt of the entry. Summary is an ATOM only
|
||
element and should be provided if there either is no content provided
|
||
for the entry, or that content is not inline (i.e., contains a src
|
||
attribute), or if the content is encoded in base64. This method will
|
||
also set the rss:description field if it wasn’t previously set or
|
||
contains the old value of summary.</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>summary</strong> – Summary of the entries contents.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Summary of the entries contents.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.title" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the title value of the entry. It should contain a human
|
||
readable title for the entry. 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> – The new title of the entry.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The entriess title.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.ttl" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get or set the ttl value. It is an RSS only element. ttl stands for
|
||
time to live. It’s a number of minutes that indicates how long a
|
||
channel can be cached before refreshing from the source.</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>ttl</strong> – Integer value representing the time to live.</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Time to live of of the entry.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="feedgen.entry.FeedEntry.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.entry.FeedEntry.updated" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Set or get the updated value which indicates the last time the entry
|
||
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
|
||
include timezone information.</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>updated</strong> – 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>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
|
||
|
||
<p>
|
||
«  <a href="api.feed.html">feedgen.feed</a>
|
||
  ::  
|
||
<a class="uplink" href="index.html">Contents</a>
|
||
  ::  
|
||
<a href="api.util.html">feedgen.util</a>  »
|
||
</p>
|
||
|
||
</div>
|
||
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2013-2016, Lars Kiesow.
|
||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
|
||
</div>
|
||
</body>
|
||
</html> |