<h1 id="make-a-website-using-the-hpr-rss-feed">Make a website using the HPR RSS Feed</h1>
<p>Welcome to part II of my experiment in how much can be done with the data ion the HPR feed</p>
<p>In my previous episode <a href="https://hackerpublicradio.org/eps.php?id=3637" class="uri">https://hackerpublicradio.org/eps.php?id=3637</a> I discussed taking the data from the HPR feed and stuffing the useful bits into a sqlite database.</p>
<p>Today, Ill discuss some of my adventures generating a static site using the feed data</p>
<h2 id="lessons-learned">Lessons learned</h2>
<ul>
<li>Maybe skip DB step</li>
<li>I tend to over use Markdown - sometimes HTML is Better</li>
<li>So much content on HPR</li>
</ul>
<h2 id="tech">Tech</h2>
<p>My original intent was to create markdown files that could be feed into an existing static site generator, something like Hugo or Jekyll.</p>
<p>I started with markdown but had to add too much html.</p>
<p>I'm am a bit fan of using Markdown, but it did not fit this particular use case</p>
<ul>
<li>Peewee - ORM - <a href="https://docs.peewee-orm.com" class="uri">https://docs.peewee-orm.com</a></li>
<li>Jinja - Templates - <a href="https://jinja.palletsprojects.com" class="uri">https://jinja.palletsprojects.com</a></li>
</ul>
<h2 id="feed-as-source-of-data">Feed as source of data</h2>
<p>I added some HTML for header footer</p>
<ul>
<li>Header
<ul>
<li>bootstrap CSS columns</li>
<li>hpr logo</li>
</ul></li>
<li>footer
<ul>
<li>Links</li>
<li>Copyright</li>
</ul></li>
</ul>
<h2 id="pages">Pages</h2>
<ul>
<li>Main page listing the most recent shows</li>
<li>A page listing all shows</li>
<li>Individual pages for each show</li>
<li>A page listing all the hosts</li>
<li>individual page for each host</li>
</ul>
<p>One thing I would like to see on the HPR page is a count of how many shows there are for each host. I have enough data, so I added show counts.</p>
<h2 id="missing-data">Missing data</h2>
<ul>
<li>host profiles - web page, avatars</li>
<li>tags</li>
<li>series</li>
<li>Summary - The short 100 character summary of what your show is about</li>
<li>License</li>
<li>Other pages on the HPR site.
<ul>
<li>What you need to know</li>
<li>How to help out</li>
<li>Requested topics</li>
<li>...</li>
</ul></li>
</ul>
<h2 id="how-does-it-work">How does it work</h2>
<ul>
<li>Peewee to read from sqlite file</li>
<li>Python aggregates the appropriate data</li>
<li>Jinja Templates for
<ul>
<li>index - passed data from most recent shows</li>
<li>All shows</li>
<li>host page</li>
<li>corespondents - all host</li>
</ul></li>
</ul>
<h3 id="todo">TODO</h3>
<ul>
<li>Incorporate Comment feed</li>
<li>Generate static copy of RSS feed.</li>
<li>Copy content from HPR pages that are not in the RSS feed.</li>
<li>Generate Tags from Keywords in the show notes.</li>
<li>Only use the Full Feed on the first run.</li>
</ul>
<h3 id="links">Links</h3>
<ul>
<li>Project - <a href="https://gitlab.com/norrist/hprfeed2db" class="uri">https://gitlab.com/norrist/hprfeed2db</a> - Suggestions/Pull Requests are welcome</li>
<li>Example site - <a href="https://hpr.norrist.xyz/" class="uri">https://hpr.norrist.xyz/</a></li>
</ul>
