Documentation for v0.4.0
This commit is contained in:
parent
daf3a41c78
commit
7e232ce915
16 changed files with 603 additions and 235 deletions
|
@ -4,8 +4,10 @@
|
|||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
.highlight .o { color: #666666 } /* Operator */
|
||||
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
|
@ -40,6 +42,7 @@
|
|||
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
||||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #208050 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.entry — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.entry — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
<link rel="up" title="API Documentation" href="api.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"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.entry</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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>
|
||||
|
@ -98,14 +99,14 @@ for RSS.</p>
|
|||
</tbody>
|
||||
</table>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">author</span><span class="p">(</span> <span class="p">{</span> <span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span> <span class="p">}</span> <span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">author</span><span class="p">(</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="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="s">'name'</span><span class="p">:</span><span class="s">'Mr. X'</span><span class="p">},{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'Max'</span><span class="p">}])</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="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="s">'John Doe'</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s">'jdoe@example.com'</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="bp">True</span> <span class="p">)</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="bp">True</span> <span class="p">)</span>
|
||||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -410,6 +411,26 @@ include timezone information.</p>
|
|||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.entry.FeedEntry.register_extension">
|
||||
<tt class="descname">register_extension</tt><big>(</big><em>namespace</em>, <em>extension_class_entry=None</em>, <em>atom=True</em>, <em>rss=True</em><big>)</big><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">
|
||||
<tt class="descname">rights</tt><big>(</big><em>rights=None</em><big>)</big><a class="headerlink" href="#feedgen.entry.FeedEntry.rights" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -531,8 +552,8 @@ include timezone information.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.feed — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.feed — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
<link rel="up" title="API Documentation" href="api.html" />
|
||||
<link rel="next" title="feedgen.entry" href="api.entry.html" />
|
||||
<link rel="prev" title="API Documentation" href="api.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.feed</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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.feed"></span><div class="section" id="feedgen-feed">
|
||||
<h1>feedgen.feed<a class="headerlink" href="#feedgen-feed" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -81,7 +82,7 @@ the prefered way to add new entries to a feed.</p>
|
|||
</tbody>
|
||||
</table>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>...
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>...
|
||||
>>> entry = feedgen.add_entry()
|
||||
>>> entry.title('First feed entry')
|
||||
</pre></div>
|
||||
|
@ -98,7 +99,7 @@ another name for add_entry(...)</p>
|
|||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.feed.FeedGenerator.atom_file">
|
||||
<tt class="descname">atom_file</tt><big>(</big><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_file" title="Permalink to this definition">¶</a></dt>
|
||||
<tt class="descname">atom_file</tt><big>(</big><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_file" title="Permalink to this definition">¶</a></dt>
|
||||
<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" />
|
||||
|
@ -108,6 +109,11 @@ another name for add_entry(...)</p>
|
|||
<li><strong>filename</strong> – Name of file to write, or a file-like object, or a URL.</li>
|
||||
<li><strong>extensions</strong> – Enable or disable the loaded extensions for the xml
|
||||
generation (default: enabled).</li>
|
||||
<li><strong>pretty</strong> – If the feed should be split into multiple lines and
|
||||
properly indented.</li>
|
||||
<li><strong>encoding</strong> – Encoding used in the XML file (default: UTF-8).</li>
|
||||
<li><strong>xml_declaration</strong> – If an XML declaration should be added to the
|
||||
output (Default: enabled).</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -117,7 +123,7 @@ generation (default: enabled).</li>
|
|||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.feed.FeedGenerator.atom_str">
|
||||
<tt class="descname">atom_str</tt><big>(</big><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='unicode'</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_str" title="Permalink to this definition">¶</a></dt>
|
||||
<tt class="descname">atom_str</tt><big>(</big><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.atom_str" title="Permalink to this definition">¶</a></dt>
|
||||
<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" />
|
||||
|
@ -128,6 +134,9 @@ generation (default: enabled).</li>
|
|||
properly indented.</li>
|
||||
<li><strong>extensions</strong> – Enable or disable the loaded extensions for the xml
|
||||
generation (default: enabled).</li>
|
||||
<li><strong>encoding</strong> – Encoding used in the XML file (default: UTF-8).</li>
|
||||
<li><strong>xml_declaration</strong> – If an XML declaration should be added to the
|
||||
output (Default: enabled).</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -136,6 +145,9 @@ generation (default: enabled).</li>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
|
@ -172,14 +184,14 @@ for RSS.</p>
|
|||
</tbody>
|
||||
</table>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">(</span> <span class="p">{</span> <span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span> <span class="p">}</span> <span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">(</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="p">)</span>
|
||||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'}]</span>
|
||||
|
||||
<span class="gp">>>> </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">([{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'Mr. X'</span><span class="p">},{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'Max'</span><span class="p">}])</span>
|
||||
<span class="gp">>>> </span><span class="n">feedgen</span><span class="o">.</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="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">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="s">'John Doe'</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s">'jdoe@example.com'</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="bp">True</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </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">'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="bp">True</span> <span class="p">)</span>
|
||||
<span class="go">[{'name':'John Doe','email':'jdoe@example.com'}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -493,10 +505,12 @@ include timezone information.</p>
|
|||
<tt class="descname">link</tt><big>(</big><em>link=None</em>, <em>replace=False</em>, <em>**kwargs</em><big>)</big><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>
|
||||
<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>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>
|
||||
<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>
|
||||
|
@ -532,16 +546,19 @@ display purposes.</p>
|
|||
<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">
|
||||
<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>
|
||||
<li><strong>replace</strong> – If old links are to be replaced (default: False)</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<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>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </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="s">'http://example.com/'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s">'self'</span><span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </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">'http://example.com/'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">'self'</span><span class="p">)</span>
|
||||
<span class="go">[{'href':'http://example.com/', 'rel':'self'}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -632,6 +649,27 @@ include timezone information.</p>
|
|||
value.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.feed.FeedGenerator.register_extension">
|
||||
<tt class="descname">register_extension</tt><big>(</big><em>namespace</em>, <em>extension_class_feed=None</em>, <em>extension_class_entry=None</em>, <em>atom=True</em>, <em>rss=True</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.register_extension" title="Permalink to this definition">¶</a></dt>
|
||||
<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> – namespace for the extension</li>
|
||||
<li><strong>extension_class_feed</strong> – Class of the feed extension to load.</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.feed.FeedGenerator.remove_entry">
|
||||
<tt class="descname">remove_entry</tt><big>(</big><em>entry</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.remove_entry" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -672,7 +710,7 @@ will also set rss:copyright.</p>
|
|||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.feed.FeedGenerator.rss_file">
|
||||
<tt class="descname">rss_file</tt><big>(</big><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_file" title="Permalink to this definition">¶</a></dt>
|
||||
<tt class="descname">rss_file</tt><big>(</big><em>filename</em>, <em>extensions=True</em>, <em>pretty=False</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_file" title="Permalink to this definition">¶</a></dt>
|
||||
<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" />
|
||||
|
@ -682,6 +720,11 @@ will also set rss:copyright.</p>
|
|||
<li><strong>filename</strong> – Name of file to write, or a file-like object, or a URL.</li>
|
||||
<li><strong>extensions</strong> – Enable or disable the loaded extensions for the xml
|
||||
generation (default: enabled).</li>
|
||||
<li><strong>pretty</strong> – If the feed should be split into multiple lines and
|
||||
properly indented.</li>
|
||||
<li><strong>encoding</strong> – Encoding used in the XML file (default: UTF-8).</li>
|
||||
<li><strong>xml_declaration</strong> – If an XML declaration should be added to the
|
||||
output (Default: enabled).</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -691,7 +734,7 @@ generation (default: enabled).</li>
|
|||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.feed.FeedGenerator.rss_str">
|
||||
<tt class="descname">rss_str</tt><big>(</big><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='unicode'</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_str" title="Permalink to this definition">¶</a></dt>
|
||||
<tt class="descname">rss_str</tt><big>(</big><em>pretty=False</em>, <em>extensions=True</em>, <em>encoding='UTF-8'</em>, <em>xml_declaration=True</em><big>)</big><a class="headerlink" href="#feedgen.feed.FeedGenerator.rss_str" title="Permalink to this definition">¶</a></dt>
|
||||
<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" />
|
||||
|
@ -702,6 +745,9 @@ generation (default: enabled).</li>
|
|||
properly indented.</li>
|
||||
<li><strong>extensions</strong> – Enable or disable the loaded extensions for the xml
|
||||
generation (default: enabled).</li>
|
||||
<li><strong>encoding</strong> – Encoding used in the XML file (default: UTF-8).</li>
|
||||
<li><strong>xml_declaration</strong> – If an XML declaration should be added to the
|
||||
output (Default: enabled).</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -710,6 +756,9 @@ generation (default: enabled).</li>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
|
@ -903,8 +952,8 @@ This is an RSS only value.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
63
api.html
63
api.html
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>API Documentation — python-feedgen 0.3.1 documentation</title>
|
||||
<title>API Documentation — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,13 +23,13 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
<link rel="next" title="feedgen.feed" href="api.feed.html" />
|
||||
<link rel="prev" title="Feedgenerator" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>API Documentation</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -67,16 +67,16 @@ produce Podcasts.</p>
|
|||
<h3>Create a Feed<a class="headerlink" href="#create-a-feed" title="Permalink to this headline">¶</a></h3>
|
||||
<p>To create a feed simply instanciate the FeedGenerator class and insert some
|
||||
data:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s">'Some Testfeed'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">author</span><span class="p">(</span> <span class="p">{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span><span class="s">'email'</span><span class="p">:</span><span class="s">'john@example.de'</span><span class="p">}</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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="s">'http://example.com'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s">'alternate'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">logo</span><span class="p">(</span><span class="s">'http://ex.com/logo.jpg'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">subtitle</span><span class="p">(</span><span class="s">'This is a cool feed!'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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="s">'http://larskiesow.de/test.atom'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s">'self'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">language</span><span class="p">(</span><span class="s">'en'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">'Some Testfeed'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">author</span><span class="p">(</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">'john@example.de'</span><span class="p">}</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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">'http://example.com'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">'alternate'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">logo</span><span class="p">(</span><span class="s1">'http://ex.com/logo.jpg'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">subtitle</span><span class="p">(</span><span class="s1">'This is a cool feed!'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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">'http://larskiesow.de/test.atom'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">'self'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">language</span><span class="p">(</span><span class="s1">'en'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that for the methods which set fields that can occur more than once in
|
||||
|
@ -87,19 +87,19 @@ a feed you can use all of the following ways to provide data:</p>
|
|||
<li>Provide a list of dictionaries with the data for several elements</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">(</span> <span class="n">name</span><span class="o">=</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s">'jdoe@example.com'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">({</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span><span class="p">})</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">([{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span><span class="p">},</span> <span class="o">...</span><span class="p">])</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="o">...</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="generate-the-feed">
|
||||
<h3>Generate the Feed<a class="headerlink" href="#generate-the-feed" title="Permalink to this headline">¶</a></h3>
|
||||
<p>After that you can generate both RSS or ATOM by calling the respective method:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">atomfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">atom_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># Get the ATOM feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">rssfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># Get the RSS feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s">'atom.xml'</span><span class="p">)</span> <span class="c"># Write the ATOM feed to a file</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s">'rss.xml'</span><span class="p">)</span> <span class="c"># Write the RSS feed to a file</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">atomfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">atom_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">rssfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c1"># Get the RSS feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s1">'atom.xml'</span><span class="p">)</span> <span class="c1"># Write the ATOM feed to a file</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">'rss.xml'</span><span class="p">)</span> <span class="c1"># Write the RSS feed to a file</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -109,9 +109,9 @@ a feed you can use all of the following ways to provide data:</p>
|
|||
and append them to the list of entries in the FeedGenerator. The most
|
||||
convenient way to go is to use the FeedGenerator itself for the
|
||||
instantiation of the FeedEntry object:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fe</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321/1'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s">'The First Episode'</span><span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fe</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321/1'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">'The First Episode'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The FeedGenerators method add_entry(...) without argument provides will
|
||||
|
@ -123,7 +123,7 @@ added.</p>
|
|||
<h3>Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The FeedGenerator supports extension to include additional data into the XML
|
||||
structure of the feeds. Extensions can be loaded like this:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s">'someext'</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">'someext'</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will try to load the extension “someext” from the file
|
||||
|
@ -143,14 +143,14 @@ kinds of feeds.</p>
|
|||
<p>One extension already provided is the podcast extension. A podcast is an RSS
|
||||
feed with some additional elements for ITunes.</p>
|
||||
<p>To produce a podcast simply load the <cite>podcast</cite> extension:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s">'podcast'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">'podcast'</span><span class="p">)</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">podcast</span><span class="o">.</span><span class="n">itunes_category</span><span class="p">(</span><span class="s">'Technology'</span><span class="p">,</span> <span class="s">'Podcasting'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">podcast</span><span class="o">.</span><span class="n">itunes_category</span><span class="p">(</span><span class="s1">'Technology'</span><span class="p">,</span> <span class="s1">'Podcasting'</span><span class="p">)</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s">'podcast.xml'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">'podcast.xml'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Of cause the extension has to be loaded for the FeedEntry objects as well
|
||||
|
@ -166,7 +166,7 @@ This can be done by calling the generating method with the keyword argument
|
|||
<div class="section" id="testing-the-generator">
|
||||
<h3>Testing the Generator<a class="headerlink" href="#testing-the-generator" title="Permalink to this headline">¶</a></h3>
|
||||
<p>You can test the module by simply executing:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>$ python -m feedgen
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>$ python -m feedgen
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -181,6 +181,7 @@ This can be done by calling the generating method with the keyword argument
|
|||
<li class="toctree-l1"><a class="reference internal" href="ext/api.ext.dc.html">feedgen.ext.dc</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="ext/api.ext.podcast.html">feedgen.ext.podcast</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="ext/api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="ext/api.ext.torrent.html">feedgen.ext.torrent</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -200,8 +201,8 @@ This can be done by calling the generating method with the keyword argument
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.util — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.util — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
<link rel="up" title="API Documentation" href="api.html" />
|
||||
<link rel="next" title="feedgen.ext.base" href="ext/api.ext.base.html" />
|
||||
<link rel="prev" title="feedgen.entry" href="api.entry.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.util</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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.util"></span><div class="section" id="feedgen-util">
|
||||
<h1>feedgen.util<a class="headerlink" href="#feedgen-util" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -87,6 +88,12 @@ of a specific key are ok.</p>
|
|||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="feedgen.util.formatRFC2822">
|
||||
<tt class="descclassname">feedgen.util.</tt><tt class="descname">formatRFC2822</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#feedgen.util.formatRFC2822" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Make sure the locale setting do not interfere with the time format.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -104,8 +111,8 @@ of a specific key are ok.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.ext.base — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.ext.base — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="../index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="../index.html" />
|
||||
<link rel="up" title="API Documentation" href="../api.html" />
|
||||
<link rel="next" title="feedgen.ext.dc" href="api.ext.dc.html" />
|
||||
<link rel="prev" title="feedgen.util" href="../api.util.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="../index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.ext.base</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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.ext.base"></span><div class="section" id="feedgen-ext-base">
|
||||
<h1>feedgen.ext.base<a class="headerlink" href="#feedgen-ext-base" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -130,8 +131,8 @@ fields.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.ext.dc — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.ext.dc — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="../index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="../index.html" />
|
||||
<link rel="up" title="API Documentation" href="../api.html" />
|
||||
<link rel="next" title="feedgen.ext.podcast" href="api.ext.podcast.html" />
|
||||
<link rel="prev" title="feedgen.ext.base" href="api.ext.base.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="../index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.ext.dc</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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.ext.dc"></span><div class="section" id="feedgen-ext-dc">
|
||||
<h1>feedgen.ext.dc<a class="headerlink" href="#feedgen-ext-dc" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -528,8 +529,8 @@ resource.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.ext.podcast — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.ext.podcast — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="../index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="../index.html" />
|
||||
<link rel="up" title="API Documentation" href="../api.html" />
|
||||
<link rel="next" title="feedgen.ext.podcast_entry" href="api.ext.podcast_entry.html" />
|
||||
<link rel="prev" title="feedgen.ext.dc" href="api.ext.dc.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="../index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.ext.podcast</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -47,6 +47,7 @@
|
|||
<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.ext.podcast"></span><div class="section" id="feedgen-ext-podcast">
|
||||
<h1>feedgen.ext.podcast<a class="headerlink" href="#feedgen-ext-podcast" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -117,26 +118,57 @@ podcast from appearing in the iTunes podcast directory.</p>
|
|||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.podcast.PodcastExtension.itunes_category">
|
||||
<tt class="descname">itunes_category</tt><big>(</big><em>itunes_category=None</em>, <em>itunes_subcategory=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_category" title="Permalink to this definition">¶</a></dt>
|
||||
<tt class="descname">itunes_category</tt><big>(</big><em>itunes_category=None</em>, <em>replace=False</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the ITunes category which appears in the category column
|
||||
and in iTunes Store Browser.</p>
|
||||
<p>The (sub-)category has to be one from the values defined at
|
||||
<a class="reference external" href="http://www.apple.com/itunes/podcasts/specs.html#categories">http://www.apple.com/itunes/podcasts/specs.html#categories</a></p>
|
||||
<p>This method can be called with:</p>
|
||||
<ul class="simple">
|
||||
<li>the fields of an itunes_category as keyword arguments</li>
|
||||
<li>the fields of an itunes_category as a dictionary</li>
|
||||
<li>a list of dictionaries containing the itunes_category fields</li>
|
||||
</ul>
|
||||
<p>An itunes_category has the following fields:</p>
|
||||
<ul class="simple">
|
||||
<li><em>cat</em> name for a category.</li>
|
||||
<li><em>sub</em> name for a subcategory, child of category</li>
|
||||
</ul>
|
||||
<p>If a podcast has more than one subcategory from the same category, the
|
||||
category is called more than once.</p>
|
||||
<p>Likei the parameter:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="p">[{</span><span class="s2">"cat"</span><span class="p">:</span><span class="s2">"Arts"</span><span class="p">,</span><span class="s2">"sub"</span><span class="p">:</span><span class="s2">"Design"</span><span class="p">},{</span><span class="s2">"cat"</span><span class="p">:</span><span class="s2">"Arts"</span><span class="p">,</span><span class="s2">"sub"</span><span class="p">:</span><span class="s2">"Food"</span><span class="p">}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>…would become:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><itunes:category text="Arts">
|
||||
<itunes:category text="Design"/>
|
||||
<itunes:category text="Food"/>
|
||||
</itunes:category>
|
||||
</pre></div>
|
||||
</div>
|
||||
<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>itunes_category</strong> – Category of the podcast.</li>
|
||||
<li><strong>itunes_subcategory</strong> – Subcategory of the podcast.</li>
|
||||
<li><strong>itunes_category</strong> – Dictionary or list of dictionaries with
|
||||
itunes_category 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">Category data of the podcast.</p>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of itunes_categories as dictionaries.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>—</p>
|
||||
<p><strong>Important note about deprecated parameter syntax:</strong> Old version of the
|
||||
feedgen did only support one category plus one subcategory which would be
|
||||
passed to this ducntion as first two parameters. For compatibility
|
||||
reasons, this still works but should not be used any may be removed at
|
||||
any time.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
|
@ -311,8 +343,8 @@ are used.</p>
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>feedgen.ext.podcast_entry — python-feedgen 0.3.1 documentation</title>
|
||||
<title>feedgen.ext.podcast_entry — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,13 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="../index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="../index.html" />
|
||||
<link rel="up" title="API Documentation" href="../api.html" />
|
||||
<link rel="next" title="feedgen.ext.torrent" href="api.ext.torrent.html" />
|
||||
<link rel="prev" title="feedgen.ext.podcast" href="api.ext.podcast.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="../index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.ext.podcast_entry</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -38,12 +39,15 @@
|
|||
«  <a href="api.ext.podcast.html">feedgen.ext.podcast</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="api.ext.torrent.html">feedgen.ext.torrent</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.ext.podcast_entry"></span><div class="section" id="feedgen-ext-podcast-entry">
|
||||
<h1>feedgen.ext.podcast_entry<a class="headerlink" href="#feedgen-ext-podcast-entry" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -284,13 +288,15 @@ are used.</p>
|
|||
«  <a href="api.ext.podcast.html">feedgen.ext.podcast</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="api.ext.torrent.html">feedgen.ext.torrent</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
203
ext/api.ext.torrent.html
Normal file
203
ext/api.ext.torrent.html
Normal file
|
@ -0,0 +1,203 @@
|
|||
<!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.ext.torrent — python-feedgen 0.4.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.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</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="top" title="python-feedgen 0.4.0 documentation" href="../index.html" />
|
||||
<link rel="up" title="API Documentation" href="../api.html" />
|
||||
<link rel="prev" title="feedgen.ext.podcast_entry" href="api.ext.podcast_entry.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="../index.html">
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>feedgen.ext.torrent</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</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.ext.torrent"></span><div class="section" id="feedgen-ext-torrent">
|
||||
<h1>feedgen.ext.torrent<a class="headerlink" href="#feedgen-ext-torrent" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Extends the FeedGenerator to produce torrent feeds.</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">copyright:</th><td class="field-body">2016, Raspbeguy <<a class="reference external" href="mailto:raspbeguy%40hashtagueule.fr">raspbeguy<span>@</span>hashtagueule<span>.</span>fr</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.ext.torrent.TorrentEntryExtension">
|
||||
<em class="property">class </em><tt class="descclassname">feedgen.ext.torrent.</tt><tt class="descname">TorrentEntryExtension</tt><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>FeedEntry extention for torrent feeds</p>
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.contentlength">
|
||||
<tt class="descname">contentlength</tt><big>(</big><em>torrent_contentlength=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.contentlength" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the size of the target 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"><strong>torrent_contentlength</strong> – The target file size.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The target file size.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.extend_rss">
|
||||
<tt class="descname">extend_rss</tt><big>(</big><em>entry</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.extend_rss" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add additional fields to an RSS item.</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>feed</strong> – The RSS item XML element to use.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.filename">
|
||||
<tt class="descname">filename</tt><big>(</big><em>torrent_filename=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.filename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the name of the torrent 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"><strong>torrent_filename</strong> – The name of the torrent file.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The name of the torrent file.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.infohash">
|
||||
<tt class="descname">infohash</tt><big>(</big><em>torrent_infohash=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.infohash" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the hash of the target 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"><strong>torrent_infohash</strong> – The target file hash.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The target hash file.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.peers">
|
||||
<tt class="descname">peers</tt><big>(</big><em>torrent_peers=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.peers" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the number od peers</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>torrent_infohash</strong> – The peers number.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The peers number.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.seeds">
|
||||
<tt class="descname">seeds</tt><big>(</big><em>torrent_seeds=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.seeds" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the number of seeds.</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>torrent_seeds</strong> – The seeds number.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The seeds number.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="feedgen.ext.torrent.TorrentEntryExtension.verified">
|
||||
<tt class="descname">verified</tt><big>(</big><em>torrent_verified=None</em><big>)</big><a class="headerlink" href="#feedgen.ext.torrent.TorrentEntryExtension.verified" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get or set the number of verified peers.</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>torrent_infohash</strong> – The verified peers number.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The verified peers number.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="class">
|
||||
<dt id="feedgen.ext.torrent.TorrentExtension">
|
||||
<em class="property">class </em><tt class="descclassname">feedgen.ext.torrent.</tt><tt class="descname">TorrentExtension</tt><a class="headerlink" href="#feedgen.ext.torrent.TorrentExtension" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>FeedGenerator extension for torrent feeds.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — python-feedgen 0.3.1 documentation</title>
|
||||
<title>Index — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,11 +24,11 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Index</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -60,6 +60,7 @@
|
|||
| <a href="#S"><strong>S</strong></a>
|
||||
| <a href="#T"><strong>T</strong></a>
|
||||
| <a href="#U"><strong>U</strong></a>
|
||||
| <a href="#V"><strong>V</strong></a>
|
||||
| <a href="#W"><strong>W</strong></a>
|
||||
|
||||
</div>
|
||||
|
@ -138,10 +139,14 @@
|
|||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.comments">comments() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.content">content() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.content">content() (feedgen.entry.FeedEntry method)</a>
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.contentlength">contentlength() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
|
@ -311,6 +316,10 @@
|
|||
<dt><a href="ext/api.ext.podcast_entry.html#feedgen.ext.podcast_entry.PodcastEntryExtension.extend_rss">(feedgen.ext.podcast_entry.PodcastEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.extend_rss">(feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
@ -338,8 +347,6 @@
|
|||
<dt><a href="ext/api.ext.dc.html#module-feedgen.ext.dc">feedgen.ext.dc (module)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.podcast.html#module-feedgen.ext.podcast">feedgen.ext.podcast (module)</a>
|
||||
</dt>
|
||||
|
@ -348,6 +355,12 @@
|
|||
<dt><a href="ext/api.ext.podcast_entry.html#module-feedgen.ext.podcast_entry">feedgen.ext.podcast_entry (module)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#module-feedgen.ext.torrent">feedgen.ext.torrent (module)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.feed.html#module-feedgen.feed">feedgen.feed (module)</a>
|
||||
</dt>
|
||||
|
@ -360,6 +373,14 @@
|
|||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator">FeedGenerator (class in feedgen.feed)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.filename">filename() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.util.html#feedgen.util.formatRFC2822">formatRFC2822() (in module feedgen.util)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
|
@ -401,6 +422,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.infohash">infohash() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.item">item() (feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -432,12 +457,12 @@
|
|||
<dt><a href="ext/api.ext.podcast.html#feedgen.ext.podcast.PodcastExtension.itunes_complete">itunes_complete() (feedgen.ext.podcast.PodcastExtension method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.podcast_entry.html#feedgen.ext.podcast_entry.PodcastEntryExtension.itunes_duration">itunes_duration() (feedgen.ext.podcast_entry.PodcastEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.podcast.html#feedgen.ext.podcast.PodcastExtension.itunes_explicit">itunes_explicit() (feedgen.ext.podcast.PodcastExtension method)</a>
|
||||
</dt>
|
||||
|
@ -551,6 +576,10 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.peers">peers() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="ext/api.ext.podcast_entry.html#feedgen.ext.podcast_entry.PodcastEntryExtension">PodcastEntryExtension (class in feedgen.ext.podcast_entry)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -558,12 +587,12 @@
|
|||
<dt><a href="ext/api.ext.podcast.html#feedgen.ext.podcast.PodcastExtension">PodcastExtension (class in feedgen.ext.podcast)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.pubdate">pubdate() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.pubDate">pubDate() (feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
@ -583,6 +612,16 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.register_extension">register_extension() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.register_extension">(feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.remove_entry">remove_entry() (feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -590,6 +629,8 @@
|
|||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.remove_item">remove_item() (feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.rights">rights() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
@ -600,8 +641,6 @@
|
|||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.rss_entry">rss_entry() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
@ -621,6 +660,10 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.seeds">seeds() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.feed.html#feedgen.feed.FeedGenerator.skipDays">skipDays() (feedgen.feed.FeedGenerator method)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -658,9 +701,17 @@
|
|||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension">TorrentEntryExtension (class in feedgen.ext.torrent)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentExtension">TorrentExtension (class in feedgen.ext.torrent)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="api.entry.html#feedgen.entry.FeedEntry.ttl">ttl() (feedgen.entry.FeedEntry method)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -689,6 +740,16 @@
|
|||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="V">V</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentEntryExtension.verified">verified() (feedgen.ext.torrent.TorrentEntryExtension method)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="W">W</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
@ -711,8 +772,8 @@
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
186
index.html
186
index.html
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Feedgenerator — python-feedgen 0.3.1 documentation</title>
|
||||
<title>Feedgenerator — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,12 +23,12 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="#" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="#" />
|
||||
<link rel="next" title="API Documentation" href="api.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="#">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Feedgenerator</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -46,21 +46,23 @@
|
|||
<div class="contents topic" id="table-of-contents">
|
||||
<p class="topic-title first">Table of Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#feedgenerator" id="id11">Feedgenerator</a><ul>
|
||||
<li><a class="reference internal" href="#installation" id="id12">Installation</a></li>
|
||||
<li><a class="reference internal" href="#create-a-feed" id="id13">Create a Feed</a></li>
|
||||
<li><a class="reference internal" href="#generate-the-feed" id="id14">Generate the Feed</a></li>
|
||||
<li><a class="reference internal" href="#add-feed-entries" id="id15">Add Feed Entries</a></li>
|
||||
<li><a class="reference internal" href="#extensions" id="id16">Extensions</a></li>
|
||||
<li><a class="reference internal" href="#testing-the-generator" id="id17">Testing the Generator</a></li>
|
||||
<li><a class="reference internal" href="#feedgenerator" id="id3">Feedgenerator</a><ul>
|
||||
<li><a class="reference internal" href="#installation" id="id4">Installation</a></li>
|
||||
<li><a class="reference internal" href="#create-a-feed" id="id5">Create a Feed</a></li>
|
||||
<li><a class="reference internal" href="#generate-the-feed" id="id6">Generate the Feed</a></li>
|
||||
<li><a class="reference internal" href="#add-feed-entries" id="id7">Add Feed Entries</a></li>
|
||||
<li><a class="reference internal" href="#extensions" id="id8">Extensions</a></li>
|
||||
<li><a class="reference internal" href="#testing-the-generator" id="id9">Testing the Generator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-documentation" id="id18">Module documentation</a></li>
|
||||
<li><a class="reference internal" href="#indices-and-tables" id="id19">Indices and tables</a></li>
|
||||
<li><a class="reference internal" href="#module-documentation" id="id10">Module documentation</a></li>
|
||||
<li><a class="reference internal" href="#indices-and-tables" id="id11">Indices and tables</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="feedgenerator">
|
||||
<h1><a class="toc-backref" href="#id11">Feedgenerator</a><a class="headerlink" href="#feedgenerator" title="Permalink to this headline">¶</a></h1>
|
||||
<h1><a class="toc-backref" href="#id3">Feedgenerator</a><a class="headerlink" href="#feedgenerator" title="Permalink to this headline">¶</a></h1>
|
||||
<p><a class="reference external" href="https://travis-ci.org/lkiesow/python-feedgen.svg?branch=master">![Build Status</a>
|
||||
](<a class="reference external" href="https://travis-ci.org/lkiesow/python-feedgen">https://travis-ci.org/lkiesow/python-feedgen</a>)</p>
|
||||
<p>This module can be used to generate web feeds in both ATOM and RSS format. It
|
||||
has support for extensions. Included is for example an extension to produce
|
||||
Podcasts.</p>
|
||||
|
@ -74,69 +76,40 @@ at license.bsd and license.lgpl.</p>
|
|||
<li>Python Package Index: <a class="reference external" href="https://pypi.python.org/pypi/feedgen/">https://pypi.python.org/pypi/feedgen/</a></li>
|
||||
</ul>
|
||||
<div class="section" id="installation">
|
||||
<h2><a class="toc-backref" href="#id12">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id4">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>Prebuild packages</strong></p>
|
||||
<p>If you are running Fedora Linux, Redhat Enterprise Linux, CentOS or Scientific
|
||||
Linux you can use one of the following packages:</p>
|
||||
<ul>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a href="#id1"><span class="problematic" id="id2">`</span></a>python-feedgen-0.3.1-1.fc21.noarch.rpm</dt>
|
||||
<dd><p class="first last"><<a class="reference external" href="http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc21.noarch.rpm">http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc21.noarch.rpm</a>>`_</p>
|
||||
</dd>
|
||||
<p>If you are running Fedora Linux, RedHat Enterprise Linux, CentOS or Scientific
|
||||
Linux you can use the RPM Copr repostiory:</p>
|
||||
<dl class="docutils">
|
||||
<dt><a href="#id1"><span class="problematic" id="id2">`</span></a><a class="reference external" href="http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/">http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/</a></dt>
|
||||
<dd><<a class="reference external" href="http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/">http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/</a>>`_</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a href="#id3"><span class="problematic" id="id4">`</span></a>python-feedgen-0.3.1-1.fc20.noarch.rpm</dt>
|
||||
<dd><p class="first last"><<a class="reference external" href="http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc20.noarch.rpm">http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc20.noarch.rpm</a>>`_</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a href="#id5"><span class="problematic" id="id6">`</span></a>python-feedgen-0.3.1-1.el7.centos.noarch.rpm</dt>
|
||||
<dd><p class="first last"><<a class="reference external" href="http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.el7.centos.noarch.rpm">http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.el7.centos.noarch.rpm</a>>`_</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a href="#id7"><span class="problematic" id="id8">`</span></a>python-feedgen-0.3.1-1.el6.noarch.rpm</dt>
|
||||
<dd><p class="first last"><<a class="reference external" href="http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.el6.noarch.rpm">http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.el6.noarch.rpm</a>>`_</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Simply download the file and run:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>$ yum localinstall python-feedgen-...noarch.rpm
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you want to build RPMs for other distributions you can use the following Source RPM:</p>
|
||||
<ul>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a href="#id9"><span class="problematic" id="id10">`</span></a>python-feedgen-0.3.1-1.fc20.src.rpm</dt>
|
||||
<dd><p class="first last"><<a class="reference external" href="http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc21.src.rpm">http://data.larskiesow.de/feedgen/python-feedgen-0.3.1-1.fc21.src.rpm</a>>`_</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Simply enable the repository and run:</p>
|
||||
<blockquote>
|
||||
<div>$ yum install python-feedgen</div></blockquote>
|
||||
<p>or for the Python 3 package:</p>
|
||||
<blockquote>
|
||||
<div>$ yum install python3-feedgen</div></blockquote>
|
||||
<p><strong>Using pip</strong></p>
|
||||
<p>You can also use pip to install the feedgen module. Simply run:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>$ pip install feedgen
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>$ pip install feedgen
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="create-a-feed">
|
||||
<h2><a class="toc-backref" href="#id13">Create a Feed</a><a class="headerlink" href="#create-a-feed" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id5">Create a Feed</a><a class="headerlink" href="#create-a-feed" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To create a feed simply instanciate the FeedGenerator class and insert some
|
||||
data:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s">'Some Testfeed'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">author</span><span class="p">(</span> <span class="p">{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span><span class="s">'email'</span><span class="p">:</span><span class="s">'john@example.de'</span><span class="p">}</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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="s">'http://example.com'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s">'alternate'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">logo</span><span class="p">(</span><span class="s">'http://ex.com/logo.jpg'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">subtitle</span><span class="p">(</span><span class="s">'This is a cool feed!'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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="s">'http://larskiesow.de/test.atom'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s">'self'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">language</span><span class="p">(</span><span class="s">'en'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">'Some Testfeed'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">author</span><span class="p">(</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">'john@example.de'</span><span class="p">}</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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">'http://example.com'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">'alternate'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">logo</span><span class="p">(</span><span class="s1">'http://ex.com/logo.jpg'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">subtitle</span><span class="p">(</span><span class="s1">'This is a cool feed!'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</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">'http://larskiesow.de/test.atom'</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">'self'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">language</span><span class="p">(</span><span class="s1">'en'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that for the methods which set fields that can occur more than once in a
|
||||
|
@ -147,42 +120,42 @@ feed you can use all of the following ways to provide data:</p>
|
|||
<li>Provide a list of dictionaries with the data for several elements</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">(</span> <span class="n">name</span><span class="o">=</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s">'jdoe@example.com'</span> <span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">({</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span><span class="p">})</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">([{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'John Doe'</span><span class="p">,</span> <span class="s">'email'</span><span class="p">:</span><span class="s">'jdoe@example.com'</span><span class="p">},</span> <span class="o">...</span><span class="p">])</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</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="o">...</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="generate-the-feed">
|
||||
<h2><a class="toc-backref" href="#id14">Generate the Feed</a><a class="headerlink" href="#generate-the-feed" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id6">Generate the Feed</a><a class="headerlink" href="#generate-the-feed" title="Permalink to this headline">¶</a></h2>
|
||||
<p>After that you can generate both RSS or ATOM by calling the respective method:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">atomfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">atom_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># Get the ATOM feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">rssfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># Get the RSS feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s">'atom.xml'</span><span class="p">)</span> <span class="c"># Write the ATOM feed to a file</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s">'rss.xml'</span><span class="p">)</span> <span class="c"># Write the RSS feed to a file</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">atomfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">atom_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">rssfeed</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c1"># Get the RSS feed as string</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s1">'atom.xml'</span><span class="p">)</span> <span class="c1"># Write the ATOM feed to a file</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">'rss.xml'</span><span class="p">)</span> <span class="c1"># Write the RSS feed to a file</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="add-feed-entries">
|
||||
<h2><a class="toc-backref" href="#id15">Add Feed Entries</a><a class="headerlink" href="#add-feed-entries" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id7">Add Feed Entries</a><a class="headerlink" href="#add-feed-entries" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To add entries (items) to a feed you need to create new FeedEntry objects and
|
||||
append them to the list of entries in the FeedGenerator. The most convenient
|
||||
way to go is to use the FeedGenerator itself for the instantiation of the
|
||||
FeedEntry object:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fe</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321/1'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s">'The First Episode'</span><span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fe</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321/1'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">'The First Episode'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The FeedGenerators method add_entry(...) without argument provides will
|
||||
<p>The FeedGenerators method <cite>add_entry(...)</cite> without argument provides will
|
||||
automatically generate a new FeedEntry object, append it to the feeds internal
|
||||
list of entries and return it, so that additional data can be added.</p>
|
||||
</div>
|
||||
<div class="section" id="extensions">
|
||||
<h2><a class="toc-backref" href="#id16">Extensions</a><a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id8">Extensions</a><a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The FeedGenerator supports extension to include additional data into the XML
|
||||
structure of the feeds. Extensions can be loaded like this:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s">'someext'</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">'someext'</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This will try to load the extension “someext” from the file <cite>ext/someext.py</cite>.
|
||||
|
@ -194,28 +167,27 @@ is required to have at least the two methods <cite>extend_rss(...)</cite> and
|
|||
“SomextEntryExtension” for every entry of the feed. This class can be located
|
||||
either in the same file as SomextExtension or in <cite>ext/someext_entry.py</cite> which
|
||||
is suggested especially for large extensions.</p>
|
||||
<p>The parameters <cite>atom</cite> and <cite>rss</cite> tell the FeedGenerator if the extensions should
|
||||
only be used for either ATOM or RSS feeds. The default value for both
|
||||
parameters is true which means that the extension would be used for both kinds
|
||||
of feeds.</p>
|
||||
<p><strong>Example: Produceing a Podcast</strong></p>
|
||||
<p>The parameters <cite>atom</cite> and <cite>rss</cite> control if the extension is used for ATOM and
|
||||
RSS feeds, respectively. The default value for both parameters is <cite>true</cite>
|
||||
meaning the extension is used for both kinds of feeds.</p>
|
||||
<p><strong>Example: Producing a Podcast</strong></p>
|
||||
<p>One extension already provided is the podcast extension. A podcast is an RSS
|
||||
feed with some additional elements for ITunes.</p>
|
||||
<p>To produce a podcast simply load the <cite>podcast</cite> extension:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="kn">import</span> <span class="n">FeedGenerator</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s">'podcast'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">'podcast'</span><span class="p">)</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">podcast</span><span class="o">.</span><span class="n">itunes_category</span><span class="p">(</span><span class="s">'Technology'</span><span class="p">,</span> <span class="s">'Podcasting'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">podcast</span><span class="o">.</span><span class="n">itunes_category</span><span class="p">(</span><span class="s1">'Technology'</span><span class="p">,</span> <span class="s1">'Podcasting'</span><span class="p">)</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321/1/file.mp3'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s">'The First Episode'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">description</span><span class="p">(</span><span class="s">'Enjoy our first episode.'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">enclosure</span><span class="p">(</span><span class="s">'http://lernfunk.de/media/654321/1/file.mp3'</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s">'audio/mpeg'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321/1/file.mp3'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">'The First Episode'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">description</span><span class="p">(</span><span class="s1">'Enjoy our first episode.'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fe</span><span class="o">.</span><span class="n">enclosure</span><span class="p">(</span><span class="s1">'http://lernfunk.de/media/654321/1/file.mp3'</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">'audio/mpeg'</span><span class="p">)</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s">'podcast.xml'</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">'podcast.xml'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Of cause the extension has to be loaded for the FeedEntry objects as well but
|
||||
|
@ -223,15 +195,20 @@ this is done automatically by the FeedGenerator for every feed entry if the
|
|||
extension is loaded for the whole feed. You can, however, load an extension for
|
||||
a specific FeedEntry by calling <cite>load_extension(...)</cite> on that entry. But this
|
||||
is a rather uncommon use.</p>
|
||||
<p>Of cause you can still produce a normal ATOM or RSS feed, even if you have
|
||||
loaded some plugins by temporary disabling them during the feed generation.
|
||||
This can be done by calling the generating method with the keyword argument
|
||||
<cite>extensions</cite> set to <cite>False</cite>.</p>
|
||||
<p>You can still produce a normal ATOM or RSS feed, even if you have loaded some
|
||||
plugins by temporary disabling them during the feed generation. This can be
|
||||
done by calling the generating method with the keyword argument <cite>extensions</cite>
|
||||
set to <cite>False</cite>.</p>
|
||||
<p><strong>Custom Extensions</strong></p>
|
||||
<p>If you want to load custom extension which are not part of the feedgen Python
|
||||
package, you can use the method <cite>register_extension</cite> instead. You can directly
|
||||
pass the classes for the feed and the entry extension to this method meaning
|
||||
that you can define them everywhere.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-the-generator">
|
||||
<h2><a class="toc-backref" href="#id17">Testing the Generator</a><a class="headerlink" href="#testing-the-generator" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id9">Testing the Generator</a><a class="headerlink" href="#testing-the-generator" title="Permalink to this headline">¶</a></h2>
|
||||
<p>You can test the module by simply executing:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>$ python -m feedgen
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>$ python -m feedgen
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you want to have a look at the code for this test to have a working code
|
||||
|
@ -240,7 +217,7 @@ example for a whole feed generation process, you can find it in the
|
|||
<hr /></div>
|
||||
</div>
|
||||
<div class="section" id="module-documentation">
|
||||
<h1><a class="toc-backref" href="#id18">Module documentation</a><a class="headerlink" href="#module-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<h1><a class="toc-backref" href="#id10">Module documentation</a><a class="headerlink" href="#module-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="api.html">API Documentation</a><ul>
|
||||
|
@ -252,13 +229,14 @@ example for a whole feed generation process, you can find it in the
|
|||
<li class="toctree-l2"><a class="reference internal" href="ext/api.ext.dc.html">feedgen.ext.dc</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ext/api.ext.podcast.html">feedgen.ext.podcast</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ext/api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ext/api.ext.torrent.html">feedgen.ext.torrent</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="indices-and-tables">
|
||||
<h1><a class="toc-backref" href="#id19">Indices and tables</a><a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
|
||||
<h1><a class="toc-backref" href="#id11">Indices and tables</a><a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
|
||||
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
|
||||
|
@ -279,8 +257,8 @@ example for a whole feed generation process, you can find it in the
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Python Module Index — python-feedgen 0.3.1 documentation</title>
|
||||
<title>Python Module Index — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,14 +23,14 @@
|
|||
<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="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Python Module Index</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -85,6 +85,11 @@
|
|||
<td>
|
||||
<a href="ext/api.ext.podcast_entry.html#module-feedgen.ext.podcast_entry"><tt class="xref">feedgen.ext.podcast_entry</tt></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="ext/api.ext.torrent.html#module-feedgen.ext.torrent"><tt class="xref">feedgen.ext.torrent</tt></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>
|
||||
|
@ -108,8 +113,8 @@
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
12
search.html
12
search.html
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — python-feedgen 0.3.1 documentation</title>
|
||||
<title>Search — python-feedgen 0.4.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.3.1',
|
||||
VERSION: '0.4.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="python-feedgen 0.3.1 documentation" href="index.html" />
|
||||
<link rel="top" title="python-feedgen 0.4.0 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>python-feedgen 0.3.1 documentation</span></a></h1>
|
||||
<span>python-feedgen 0.4.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Search</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
@ -82,8 +82,8 @@
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2013, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||||
© Copyright 2013-2016, Lars Kiesow.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue