Minor documentation fixes

This commit is contained in:
Lars Kiesow 2018-06-03 10:41:51 +02:00
parent f382690e48
commit eb05713453
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73
17 changed files with 135 additions and 204 deletions

View file

@ -82,9 +82,21 @@ div.sphinxsidebar input {
}
div.sphinxsidebar #searchbox input[type="text"] {
width: 170px;
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
@ -199,6 +211,11 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 59em;
max-width: 70em;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
@ -332,6 +349,11 @@ table.docutils {
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}

8
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

View file

@ -301,7 +301,7 @@
li.hide();
// Determine where in the parents children list to insert this comment.
for(i=0; i < siblings.length; i++) {
for(var i=0; i < siblings.length; i++) {
if (comp(comment, siblings[i]) <= 0) {
$('#cd' + siblings[i].id)
.parent()

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.entry &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="feedgen.util" href="api.util.html" />
<link rel="prev" title="feedgen.feed" href="api.feed.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.entry</span></h2>
@ -97,7 +88,7 @@ mandatory for RSS.</p>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">([{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span> <span class="s1">&#39;Mr. X&#39;</span><span class="p">},</span> <span class="p">{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span> <span class="s1">&#39;Max&#39;</span><span class="p">}])</span>
@ -570,7 +561,7 @@ include timezone information.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.feed &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="feedgen.entry" href="api.entry.html" />
<link rel="prev" title="API Documentation" href="api.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.feed</span></h2>
@ -88,7 +79,7 @@ the entry will be appended to the feed.
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">...</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">...</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">entry</span> <span class="o">=</span> <span class="n">feedgen</span><span class="o">.</span><span class="n">add_entry</span><span class="p">()</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">entry</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;First feed entry&#39;</span><span class="p">)</span>
</pre></div>
@ -190,7 +181,7 @@ is mandatory for RSS.</p>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">author</span><span class="p">([{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;Mr. X&#39;</span><span class="p">},{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;Max&#39;</span><span class="p">}])</span>
@ -374,9 +365,9 @@ automatically create the FeedEntry objects.</p>
<dl class="method">
<dt id="feedgen.feed.FeedGenerator.generator">
<code class="descname">generator</code><span class="sig-paren">(</span><em>generator=None</em>, <em>version=None</em>, <em>uri=None</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.feed.FeedGenerator.generator" title="Permalink to this definition"></a></dt>
<dd><p>Get or the generator of the feed which identifies the software used
to generate the feed, for debugging and other purposes. Both the uri
and version attributes are optional and only available in the ATOM
<dd><p>Get or set the generator of the feed which identifies the software
used to generate the feed, for debugging and other purposes. Both the
uri and version attributes are optional and only available in the ATOM
feed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -569,7 +560,7 @@ display purposes.</p>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">link</span><span class="p">(</span> <span class="n">href</span><span class="o">=</span><span class="s1">&#39;http://example.com/&#39;</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">&#39;self&#39;</span><span class="p">)</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">feedgen</span><span class="o">.</span><span class="n">link</span><span class="p">(</span> <span class="n">href</span><span class="o">=</span><span class="s1">&#39;http://example.com/&#39;</span><span class="p">,</span> <span class="n">rel</span><span class="o">=</span><span class="s1">&#39;self&#39;</span><span class="p">)</span>
<span class="go">[{&#39;href&#39;:&#39;http://example.com/&#39;, &#39;rel&#39;:&#39;self&#39;}]</span>
</pre></div>
</div>
@ -967,7 +958,7 @@ feed. This is an RSS only value.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>API Documentation &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="feedgen.feed" href="api.feed.html" />
<link rel="prev" title="Feedgenerator" href="index.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>API Documentation</span></h2>
@ -66,7 +57,7 @@ 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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">&#39;http://lernfunk.de/media/654321&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;Some Testfeed&#39;</span><span class="p">)</span>
@ -86,7 +77,7 @@ 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-default"><div class="highlight"><pre><span></span>&gt;&gt;&gt; fg.contributor(name=&#39;John Doe&#39;, email=&#39;jdoe@example.com&#39; )
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>&gt;&gt;&gt; fg.contributor(name=&#39;John Doe&#39;, email=&#39;jdoe@example.com&#39; )
&gt;&gt;&gt; fg.contributor({&#39;name&#39;:&#39;John Doe&#39;, &#39;email&#39;:&#39;jdoe@example.com&#39;})
&gt;&gt;&gt; fg.contributor([{&#39;name&#39;:&#39;John&#39;, &#39;email&#39;:&#39;jdoe@example.com&#39;}, …])
</pre></div>
@ -96,7 +87,7 @@ a feed you can use all of the following ways to provide data:</p>
<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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
<span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the RSS feed as string</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s1">&#39;atom.xml&#39;</span><span class="p">)</span> <span class="c1"># Write the ATOM feed to a file</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">&#39;rss.xml&#39;</span><span class="p">)</span> <span class="c1"># Write the RSS feed to a file</span>
@ -109,7 +100,7 @@ method:</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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">&#39;http://lernfunk.de/media/654321/1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;The First Episode&#39;</span><span class="p">)</span>
</pre></div>
@ -123,7 +114,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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;someext&#39;</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;someext&#39;</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>This will try to load the extension “someext” from the file
@ -143,7 +134,7 @@ both 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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;podcast&#39;</span><span class="p">)</span>
<span class="gp">...</span>
@ -166,7 +157,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-default"><div class="highlight"><pre><span></span>$ python -m feedgen
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python -m feedgen
</pre></div>
</div>
</div>
@ -202,7 +193,7 @@ This can be done by calling the generating method with the keyword argument
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.util &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="search.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>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.util</span></h2>
@ -111,7 +102,7 @@ values.</li>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.ext.base &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="../search.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>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.base</span></h2>
@ -130,7 +121,7 @@ fields.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.ext.dc &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="../search.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>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.dc</span></h2>
@ -451,6 +442,12 @@ resource.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="feedgen.ext.dc.DcBaseExtension.extend_ns">
<code class="descname">extend_ns</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.dc.DcBaseExtension.extend_ns" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dict that will be used in the namespace map for the feed.</p>
</dd></dl>
<dl class="method">
<dt id="feedgen.ext.dc.DcBaseExtension.extend_rss">
<code class="descname">extend_rss</code><span class="sig-paren">(</span><em>rss_feed</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.dc.DcBaseExtension.extend_rss" title="Permalink to this definition"></a></dt>
@ -531,7 +528,7 @@ resource.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.ext.podcast &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="../search.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>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.podcast</span></h2>
@ -64,6 +55,12 @@
<dt id="feedgen.ext.podcast.PodcastExtension">
<em class="property">class </em><code class="descclassname">feedgen.ext.podcast.</code><code class="descname">PodcastExtension</code><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension" title="Permalink to this definition"></a></dt>
<dd><p>FeedGenerator extension for podcasts.</p>
<dl class="method">
<dt id="feedgen.ext.podcast.PodcastExtension.extend_ns">
<code class="descname">extend_ns</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.extend_ns" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dict that will be used in the namespace map for the feed.</p>
</dd></dl>
<dl class="method">
<dt id="feedgen.ext.podcast.PodcastExtension.extend_rss">
<code class="descname">extend_rss</code><span class="sig-paren">(</span><em>rss_feed</em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.extend_rss" title="Permalink to this definition"></a></dt>
@ -135,11 +132,11 @@ and in iTunes Store Browser.</p>
<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-default"><div class="highlight"><pre><span></span><span class="p">[{</span><span class="s2">&quot;cat&quot;</span><span class="p">:</span><span class="s2">&quot;Arts&quot;</span><span class="p">,</span><span class="s2">&quot;sub&quot;</span><span class="p">:</span><span class="s2">&quot;Design&quot;</span><span class="p">},{</span><span class="s2">&quot;cat&quot;</span><span class="p">:</span><span class="s2">&quot;Arts&quot;</span><span class="p">,</span><span class="s2">&quot;sub&quot;</span><span class="p">:</span><span class="s2">&quot;Food&quot;</span><span class="p">}]</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span><span class="s2">&quot;cat&quot;</span><span class="p">:</span><span class="s2">&quot;Arts&quot;</span><span class="p">,</span><span class="s2">&quot;sub&quot;</span><span class="p">:</span><span class="s2">&quot;Design&quot;</span><span class="p">},{</span><span class="s2">&quot;cat&quot;</span><span class="p">:</span><span class="s2">&quot;Arts&quot;</span><span class="p">,</span><span class="s2">&quot;sub&quot;</span><span class="p">:</span><span class="s2">&quot;Food&quot;</span><span class="p">}]</span>
</pre></div>
</div>
<p>…would become:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">itunes</span><span class="p">:</span><span class="n">category</span> <span class="n">text</span><span class="o">=</span><span class="s2">&quot;Arts&quot;</span><span class="o">&gt;</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">itunes</span><span class="p">:</span><span class="n">category</span> <span class="n">text</span><span class="o">=</span><span class="s2">&quot;Arts&quot;</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="n">itunes</span><span class="p">:</span><span class="n">category</span> <span class="n">text</span><span class="o">=</span><span class="s2">&quot;Design&quot;</span><span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="n">itunes</span><span class="p">:</span><span class="n">category</span> <span class="n">text</span><span class="o">=</span><span class="s2">&quot;Food&quot;</span><span class="o">/&gt;</span>
<span class="o">&lt;/</span><span class="n">itunes</span><span class="p">:</span><span class="n">category</span><span class="o">&gt;</span>
@ -343,7 +340,7 @@ tag are used.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.ext.podcast_entry &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/documentation_options.js"></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>
@ -25,8 +17,7 @@
<link rel="search" title="Search" href="../search.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>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.podcast_entry</span></h2>
@ -300,7 +291,7 @@ characters. If &lt;itunes:summary&gt; is not included, the contents of the
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,28 +4,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedgen.ext.torrent &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="../_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="feedgen.ext.podcast_entry" href="api.ext.podcast_entry.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.torrent</span></h2>
@ -177,6 +168,12 @@
<dt id="feedgen.ext.torrent.TorrentExtension">
<em class="property">class </em><code class="descclassname">feedgen.ext.torrent.</code><code class="descname">TorrentExtension</code><a class="headerlink" href="#feedgen.ext.torrent.TorrentExtension" title="Permalink to this definition"></a></dt>
<dd><p>FeedGenerator extension for torrent feeds.</p>
<dl class="method">
<dt id="feedgen.ext.torrent.TorrentExtension.extend_ns">
<code class="descname">extend_ns</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.torrent.TorrentExtension.extend_ns" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dict that will be used in the namespace map for the feed.</p>
</dd></dl>
</dd></dl>
</div>
@ -195,7 +192,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -5,27 +5,18 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>Index</span></h2>
@ -196,12 +187,20 @@
<li><a href="ext/api.ext.dc.html#feedgen.ext.dc.DcBaseExtension.extend_atom">(feedgen.ext.dc.DcBaseExtension method)</a>
</li>
<li><a href="ext/api.ext.dc.html#feedgen.ext.dc.DcEntryExtension.extend_atom">(feedgen.ext.dc.DcEntryExtension method)</a>
</li>
</ul></li>
<li><a href="ext/api.ext.base.html#feedgen.ext.base.BaseExtension.extend_ns">extend_ns() (feedgen.ext.base.BaseExtension method)</a>
<ul>
<li><a href="ext/api.ext.dc.html#feedgen.ext.dc.DcBaseExtension.extend_ns">(feedgen.ext.dc.DcBaseExtension method)</a>
</li>
<li><a href="ext/api.ext.podcast.html#feedgen.ext.podcast.PodcastExtension.extend_ns">(feedgen.ext.podcast.PodcastExtension method)</a>
</li>
<li><a href="ext/api.ext.torrent.html#feedgen.ext.torrent.TorrentExtension.extend_ns">(feedgen.ext.torrent.TorrentExtension method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ext/api.ext.base.html#feedgen.ext.base.BaseExtension.extend_ns">extend_ns() (feedgen.ext.base.BaseExtension method)</a>
</li>
<li><a href="ext/api.ext.base.html#feedgen.ext.base.BaseExtension.extend_rss">extend_rss() (feedgen.ext.base.BaseExtension method)</a>
<ul>
@ -510,7 +509,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,28 +4,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Feedgenerator &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="API Documentation" href="api.html" />
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="#">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>Feedgenerator</span></h2>
@ -80,16 +71,16 @@ at license.bsd and license.lgpl.</p>
Linux you can use the RPM Copr repostiory:</p>
<p><a class="reference external" href="http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/">http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/</a></p>
<p>Simply enable the repository and run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ yum install python-feedgen
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ yum install python-feedgen
</pre></div>
</div>
<p>or for the Python 3 package:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ yum install python3-feedgen
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ yum install python3-feedgen
</pre></div>
</div>
<p><strong>Using pip</strong></p>
<p>You can also use pip to install the feedgen module. Simply run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install feedgen
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install feedgen
</pre></div>
</div>
</div>
@ -97,7 +88,7 @@ Linux you can use the RPM Copr repostiory:</p>
<h2><a class="toc-backref" href="#id3">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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">&#39;http://lernfunk.de/media/654321&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;Some Testfeed&#39;</span><span class="p">)</span>
@ -117,7 +108,7 @@ 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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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">&#39;John Doe&#39;</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s1">&#39;jdoe@example.com&#39;</span> <span class="p">)</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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">&#39;John Doe&#39;</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s1">&#39;jdoe@example.com&#39;</span> <span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">contributor</span><span class="p">([{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">},</span> <span class="o">...</span><span class="p">])</span>
</pre></div>
@ -126,7 +117,7 @@ feed you can use all of the following ways to provide data:</p>
<div class="section" id="generate-the-feed">
<h2><a class="toc-backref" href="#id4">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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the ATOM feed as string</span>
<span class="gp">&gt;&gt;&gt; </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="kc">True</span><span class="p">)</span> <span class="c1"># Get the RSS feed as string</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">atom_file</span><span class="p">(</span><span class="s1">&#39;atom.xml&#39;</span><span class="p">)</span> <span class="c1"># Write the ATOM feed to a file</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">rss_file</span><span class="p">(</span><span class="s1">&#39;rss.xml&#39;</span><span class="p">)</span> <span class="c1"># Write the RSS feed to a file</span>
@ -139,7 +130,7 @@ feed you can use all of the following ways to provide data:</p>
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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span><span class="n">fe</span><span class="o">.</span><span class="n">id</span><span class="p">(</span><span class="s1">&#39;http://lernfunk.de/media/654321/1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fe</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;The First Episode&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fe</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="s2">&quot;http://lernfunk.de/feed&quot;</span><span class="p">)</span>
@ -153,7 +144,7 @@ list of entries and return it, so that additional data can be added.</p>
<h2><a class="toc-backref" href="#id6">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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;someext&#39;</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;someext&#39;</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">rss</span><span class="o">=</span><span class="kc">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>.
@ -172,7 +163,7 @@ meaning the extension is used for both 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-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">feedgen.feed</span> <span class="k">import</span> <span class="n">FeedGenerator</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span> <span class="o">=</span> <span class="n">FeedGenerator</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fg</span><span class="o">.</span><span class="n">load_extension</span><span class="p">(</span><span class="s1">&#39;podcast&#39;</span><span class="p">)</span>
<span class="gp">...</span>
@ -206,7 +197,7 @@ that you can define them everywhere.</p>
<div class="section" id="testing-the-generator">
<h2><a class="toc-backref" href="#id7">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-default"><div class="highlight"><pre><span></span>$ python -m feedgen
<div class="highlight-default notranslate"><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
@ -256,7 +247,7 @@ example for a whole feed generation process, you can find it in the
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Python Module Index &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -26,8 +18,7 @@
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>Python Module Index</span></h2>
@ -113,7 +104,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

View file

@ -4,20 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &#8212; python-feedgen 0.7.0 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/documentation_options.js"></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>
@ -31,8 +23,7 @@
<script type="text/javascript" id="searchindexloader"></script>
</head>
<body>
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.7.0 documentation</span></a></h1>
<h2 class="heading"><span>Search</span></h2>
@ -82,7 +73,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long