python-feedgen/ext/api.ext.podcast.html

350 lines
23 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>feedgen.ext.podcast &#8212; python-feedgen 1.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/lernfunk.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<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>
<div class="header" role="banner"><h1 class="heading"><a href="../index.html">
<span>python-feedgen 1.0.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.ext.podcast</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="api.ext.dc.html">feedgen.ext.dc</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a>&#160;&#160;»
</p>
</div>
<div class="content" role="main">
<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><section id="feedgen-ext-podcast">
<h1>feedgen.ext.podcast<a class="headerlink" href="#feedgen-ext-podcast" title="Permalink to this heading"></a></h1>
<p>Extends the FeedGenerator to produce podcasts.</p>
<dl class="field-list simple">
<dt class="field-odd">copyright<span class="colon">:</span></dt>
<dd class="field-odd"><p>2013, Lars Kiesow &lt;<a class="reference external" href="mailto:lkiesow&#37;&#52;&#48;uos&#46;de">lkiesow<span>&#64;</span>uos<span>&#46;</span>de</a>&gt;</p>
</dd>
<dt class="field-even">license<span class="colon">:</span></dt>
<dd class="field-even"><p>FreeBSD and LGPL, see license.* for more details.</p>
</dd>
</dl>
</section>
<dl class="py class">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">feedgen.ext.podcast.</span></span><span class="sig-name descname"><span class="pre">PodcastExtension</span></span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension" title="Permalink to this definition"></a></dt>
<dd><p>FeedGenerator extension for podcasts.</p>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.extend_ns">
<span class="sig-name descname"><span class="pre">extend_ns</span></span><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="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.extend_rss">
<span class="sig-name descname"><span class="pre">extend_rss</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rss_feed</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.extend_rss" title="Permalink to this definition"></a></dt>
<dd><p>Extend an RSS feed root with set itunes fields.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The feed root element.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_author">
<span class="sig-name descname"><span class="pre">itunes_author</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_author</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_author" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:author. The content of this tag is shown in
the Artist column in iTunes. If the tag is not present, iTunes uses the
contents of the &lt;author&gt; tag. If &lt;itunes:author&gt; is not present at the
feed level, iTunes will use the contents of &lt;managingEditor&gt;.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_author</strong> The author of the podcast.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The author of the podcast.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_block">
<span class="sig-name descname"><span class="pre">itunes_block</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_block</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_block" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the ITunes block attribute. Use this to prevent the
entire podcast from appearing in the iTunes podcast directory.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_block</strong> Block the podcast.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>If the podcast is blocked.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_category">
<span class="sig-name descname"><span class="pre">itunes_category</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_category</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><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><p>the fields of an itunes_category as keyword arguments</p></li>
<li><p>the fields of an itunes_category as a dictionary</p></li>
<li><p>a list of dictionaries containing the itunes_category fields</p></li>
</ul>
<p>An itunes_category has the following fields:</p>
<ul class="simple">
<li><p><em>cat</em> name for a category.</p></li>
<li><p><em>sub</em> name for a subcategory, child of category</p></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-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 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>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>itunes_category</strong> Dictionary or list of dictionaries with
itunes_category data.</p></li>
<li><p><strong>replace</strong> Add or replace old data.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of itunes_categories as dictionaries.</p>
</dd>
</dl>
<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="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_complete">
<span class="sig-name descname"><span class="pre">itunes_complete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_complete</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_complete" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:complete value of the podcast. This tag can be
used to indicate the completion of a podcast.</p>
<p>If you populate this tag with “yes”, you are indicating that no more
episodes will be added to the podcast. If the &lt;itunes:complete&gt; tag is
present and has any other value (e.g. “no”), it will have no effect on
the podcast.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_complete</strong> If the podcast is complete.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>If the podcast is complete.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_explicit">
<span class="sig-name descname"><span class="pre">itunes_explicit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_explicit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_explicit" title="Permalink to this definition"></a></dt>
<dd><p>Get or the the itunes:explicit value of the podcast. This tag should
be used to indicate whether your podcast contains explicit material.
The three values for this tag are “yes”, “no”, and “clean”.</p>
<p>If you populate this tag with “yes”, an “explicit” parental advisory
graphic will appear next to your podcast artwork on the iTunes Store
and in the Name column in iTunes. If the value is “clean”, the parental
advisory type is considered Clean, meaning that no explicit language or
adult content is included anywhere in the episodes, and a “clean”
graphic will appear. If the explicit tag is present and has any other
value (e.g., “no”), you see no indicator — blank is the default
advisory type.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_explicit</strong> If the podcast contains explicit material.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>If the podcast contains explicit material.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_image">
<span class="sig-name descname"><span class="pre">itunes_image</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_image</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_image" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the image for the podcast. This tag specifies the artwork
for your podcast. Put the URL to the image in the href attribute.
iTunes prefers square .jpg images that are at least 1400x1400 pixels,
which is different from what is specified for the standard RSS image
tag. In order for a podcast to be eligible for an iTunes Store feature,
the accompanying image must be at least 1400x1400 pixels.</p>
<p>iTunes supports images in JPEG and PNG formats with an RGB color space
(CMYK is not supported). The URL must end in “.jpg” or “.png”. If the
&lt;itunes:image&gt; tag is not present, iTunes will use the contents of the
RSS image tag.</p>
<p>If you change your podcasts image, also change the files name. iTunes
may not change the image if it checks your feed and the image URL is
the same. The server hosting your cover art image must allow HTTP head
requests for iTS to be able to automatically update your cover art.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_image</strong> Image of the podcast.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Image of the podcast.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_new_feed_url">
<span class="sig-name descname"><span class="pre">itunes_new_feed_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_new_feed_url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_new_feed_url" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the new-feed-url property of the podcast. This tag allows
you to change the URL where the podcast feed is located</p>
<p>After adding the tag to your old feed, you should maintain the old feed
for 48 hours before retiring it. At that point, iTunes will have
updated the directory with the new feed URL.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_new_feed_url</strong> New feed URL.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>New feed URL.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_owner">
<span class="sig-name descname"><span class="pre">itunes_owner</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">email</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_owner" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:owner of the podcast. This tag contains
information that will be used to contact the owner of the podcast for
communication specifically about the podcast. It will not be publicly
displayed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_owner</strong> The owner of the feed.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Data of the owner of the feed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_subtitle">
<span class="sig-name descname"><span class="pre">itunes_subtitle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_subtitle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_subtitle" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:subtitle value for the podcast. The contents
of this tag are shown in the Description column in iTunes. The subtitle
displays best if it is only a few words long.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_subtitle</strong> Subtitle of the podcast.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Subtitle of the podcast.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_summary">
<span class="sig-name descname"><span class="pre">itunes_summary</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_summary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_summary" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:summary value for the podcast. The contents of
this tag are shown in a separate window that appears when the “circled
i” in the Description column is clicked. It also appears on the iTunes
page for your podcast. This field can be up to 4000 characters. If
<cite>&lt;itunes:summary&gt;</cite> is not included, the contents of the &lt;description&gt;
tag are used.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_summary</strong> Summary of the podcast.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Summary of the podcast.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.ext.podcast.PodcastExtension.itunes_type">
<span class="sig-name descname"><span class="pre">itunes_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">itunes_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.ext.podcast.PodcastExtension.itunes_type" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the itunes:type value of the podcast. This tag should
be used to indicate the type of your podcast.
The two values for this tag are “episodic” and “serial”.</p>
<p>If your show is Serial you must use this tag.</p>
<p>Specify episodic when episodes are intended to be consumed without any
specific order. Apple Podcasts will present newest episodes first and
display the publish date (required) of each episode. If organized into
seasons, the newest season will be presented first - otherwise,
episodes will be grouped by year published, newest first.</p>
<blockquote>
<div><p>Specify serial when episodes are intended to be consumed in sequential
order. Apple Podcasts will present the oldest episodes first and
display the episode numbers (required) of each episode. If organized
into seasons, the newest season will be presented first and
&lt;itunes:episode&gt; numbers must be given for each episode.</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>itunes_type</strong> The type of the podcast</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>type of the pdocast.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="api.ext.dc.html">feedgen.ext.dc</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.ext.podcast_entry.html">feedgen.ext.podcast_entry</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>