<h2 id="importance-of-small-toy-projects">Importance of Small toy projects</h2>
<p>Inspired by</p>
<ul>
<li><a href="https://talkpython.fm/episodes/transcript/327/little-automation-tools-in-python" class="uri">https://talkpython.fm/episodes/transcript/327/little-automation-tools-in-python</a>
<ul>
<li>Automating little things</li>
</ul></li>
<li>hpr3558 :: How I'm learning Haskell
<ul>
<li>The Host talks about learning Haskell and says something like</li>
<li>Finishing a small project is better than Starting a big project and not completing it.</li>
<li>And You can not learn to code by reading, you need practice</li>
</ul></li>
</ul>
<h3 id="my-recommendation-for-learning-a-new-language.">My recommendation for learning a new language.</h3>
<ol type="1">
<li>Think about a small problem you want to solve with code.</li>
<li>Start banging away at it.</li>
<li>Redo over and over, its OK</li>
<li>Same project but better</li>
<li>Learn new tech and practice</li>
</ol>
<h3 id="an-example-of-one-of-my-small-projects">An example of one of my small projects</h3>
<ul>
<li>Original intent of my podfaded project
<ul>
<li>Mostly Tech/Linux podcasts</li>
<li>Find every podcast I could</li>
<li>Track release cadence</li>
<li>Rate how podfaded the feed is</li>
<li>Use search API to find RSS feeds</li>
</ul></li>
</ul>
<h3 id="first-attempt-plan">First attempt plan</h3>
<ul>
<li>Scrape podcast networks
<ul>
<li>used beautiful soup - something I wanted to learn anyway</li>
<li>HTML
<ul>
<li>Jinja templating - something I wanted to learn anyway</li>
<li>Bootstrap - something I wanted to learn anyway</li>
<li>Different colors based on how podfaded</li>
</ul></li>
</ul></li>
</ul>
<h3 id="first-attempt-problems">First attempt problems</h3>
<ul>
<li>individual script per network</li>
<li>4-5 different scripts</li>
<li>took forever to run</li>
<li>Broke when networks changed their page layout</li>
</ul>
<h3 id="redo">Redo</h3>
<ul>
<li>Test Driven Development and pytest
<ul>
<li>Red Green Refactor</li>
<li>Confidence to change code</li>
</ul></li>
<li>Simplify - one scrapper script</li>
<li>Embed audio player for latest episode</li>
</ul>
<h3 id="how-it-works---scraping-pages-for-feeds">How it works - Scraping pages for feeds</h3>
<ul>
<li><code>scrape_for_feeds.py</code></li>
<li>Provide a list of websites that have lists of podcasts</li>
<li>Search the page for any links</li>
<li>Check if the feed is valid by trying to parse it with <code>feedparser</code></li>
<li>Add feed to database</li>
</ul>
<h3 id="podcasts-pages-i-scrape">Podcasts pages I scrape</h3>
<ul>
<li><a href="https://wiki.ubuntu.com/Podcasts" class="uri">https://wiki.ubuntu.com/Podcasts</a></li>
<li><a href="http://www.thelinuxlink.net" class="uri">http://www.thelinuxlink.net</a></li>
<li><a href="http://freeculturepodcasts.org" class="uri">http://freeculturepodcasts.org</a></li>
</ul>
<h3 id="how-it-works---checking-the-feeds">How it works - Checking the feeds</h3>
<ul>
<li><code>feed_info.py</code></li>
<li>loop through feeds</li>
<li>use <code>feedparser</code> to find latest episode
<ul>
<li>title and enclosure (audio file)</li>
</ul></li>
</ul>
<h3 id="html-output">HTML Output</h3>
<ul>
<li><a href="https://podfaded.norrist.xyz/" class="uri">https://podfaded.norrist.xyz/</a></li>
<li>Currently hosted on a Free Tier VPS</li>
<li>No Promises it will be there forever</li>
</ul>
<h3 id="feedback-welcome">Feedback Welcome</h3>
<ul>
<li><a href="https://gitlab.com/norrist/podfaded2" class="uri">https://gitlab.com/norrist/podfaded2</a></li>
<li>Bugs
<ul>
<li>Sometimes the title is missing, so some of the CSS coloring doesn't work</li>
<li>Excluded podcasts still occasionally show up on the list</li>
</ul></li>
<li>Looking for more curated lists of podcast pages
<ul>
<li>not search sites</li>
</ul></li>
<li>Maybe scrape HPR podcast recommendation episodes</li>
</ul>
<p><em>Example</em><br />
<img src="https://hackerpublicradio.org/eps/hpr3656/podfaded.png" alt="Example" /></p>
