<h1 id="how-i-prepared-episode-2493-youtube-subscriptions---update">How I prepared episode 2493: YouTube Subscriptions - update</h1>
<h2 id="introduction">Introduction</h2>
<p>In show <a href="https://hackerpublicradio.org/eps.php?id=2493" title="YouTube Subscriptions - update">2493</a> I listed a number of the YouTube channels I watch. Some of what I did to prepare the notes was to cut and paste information from YouTube pages, but the basic list itself was generated programmatically. I thought the process I used might be of interest to somebody so I am describing it here.</p>
<h2 id="components">Components</h2>
<p>I needed four components to achieve what I wanted:</p>
<ul>
<li><a href="https://www.youtube.com/subscription_manager" title="YouTube Subscription Manager page">YouTube subscription list</a> (only available in OPML format as far as I know)</li>
<li>The <a href="https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html" title="xmlstarlet documentation"><code>xmlstarlet</code></a> tool to parse the OPML</li>
<li><a href="https://www.template-toolkit.org/" title="Template Toolkit">Template Toolkit</a> which I used to generate Markdown</li>
<li>The <code>pandoc</code> document converter tool to generate HTML</li>
</ul>
<p>I will talk a little about the first three components in this episode in order to provide an overview.</p>
<h2 id="full-length-notes">Full-length notes</h2>
<p>The full-length notes (available <a href="https://hackerpublicradio.org/eps/hpr2544/full_shownotes.html">here</a>) contain details of the processes involved in building the list of channels.</p>
<h2 id="links">Links</h2>
<ul>
<li>YouTube <a href="https://www.youtube.com/subscription_manager"><em>Subscription Manager</em></a> page</li>
<li>The <a href="https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html"><code>xmlstarlet</code></a> manual (HTML, single page)</li>
<li><a href="https://www.template-toolkit.org/"><em>Template Toolkit</em></a>
<ul>
<li><a href="https://www.template-toolkit.org/docs/manual/Plugins.html#section_Datafile"><code>Template::Plugin::Datafile</code></a></li>
<li><a href="https://www.template-toolkit.org/docs/manual/VMethods.html#method_replace">Template Toolkit <code>replace</code> virtual method</a></li>
</ul></li>
<li>The <a href="https://pandoc.org/"><code>pandoc</code></a> document converter</li>
<li>Previous HPR shows referred to:
<ul>
<li><a href="https://hackerpublicradio.org/eps.php?id=2202"><em>hpr2202 :: Makers on YouTube</em></a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2493"><em>hpr2493 :: YouTube Subscriptions - update</em></a></li>
</ul></li>
<li>Resources:
<ul>
<li><a href="https://hackerpublicradio.org/eps/hpr2544/full_shownotes.html">Detailed notes</a></li>
<li>Example template file: <a href="https://hackerpublicradio.org/eps/hpr2544/yt_template.tpl">yt_template.tpl</a></li>
</ul></li>
</ul>
