Update dynamic generation of latest shows in index

This commit is contained in:
Roan Horning 2022-07-03 22:46:07 -04:00
parent 810785deb3
commit e4565a5168
No known key found for this signature in database
GPG Key ID: 6E07059BD168E395

View File

@ -20,9 +20,12 @@
<h1>latest shows</h1> <h1>latest shows</h1>
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH latest_episodes IN DBI.query(' <!--% FOREACH latest_episodes IN DBI.query('
SELECT Episodes.id, CASE Episodes.is_explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS is_explicit , SELECT
substr(\'0000\' || Episodes.id, -4, 4) AS [id],
CASE Episodes.is_explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS is_explicit ,
Episodes.published, Episodes.license, Episodes.title, Episodes.summary, Episodes.series, Episodes.show_notes, Episodes.published, Episodes.license, Episodes.title, Episodes.summary, Episodes.series, Episodes.show_notes,
Contributors.id AS [host_id], Contributors.handle, Contributors.email, Contributors.avatar substr(\'0000\' || Contributors.id, -4, 4) AS [host_id],
Contributors.handle, Contributors.email, Contributors.avatar
FROM Episodes INNER JOIN Contributors ON Episodes.correspondent_id = Contributors.id FROM Episodes INNER JOIN Contributors ON Episodes.correspondent_id = Contributors.id
WHERE Episodes.published BETWEEN date(\'now\', \'-7 days\') AND date(\'now\') WHERE Episodes.published BETWEEN date(\'now\', \'-7 days\') AND date(\'now\')
ORDER BY published DESC ORDER BY published DESC
@ -31,27 +34,26 @@
<hr> <hr>
<article> <article>
<header> <header>
<!--% %-->
<h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1> <h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1>
<h3><!--% latest_episodes.description %--></h3> <h3><!--% latest_episodes.description %--></h3>
<p class="meta"$>hosted by <a href="correspondents/host<!--% latest_episodes.host_id %-->.html"><!--% latest_episodes.handle %--></a> on <!--% latest_episodes.published %--> is flagged as <!--% latest_episodes.is_explicit %--> and released under a <!--% latest_episodes.license %--> license. <br> <p class="meta"$>hosted by <a href="correspondents/host<!--% latest_episodes.host_id %-->.html"><!--% latest_episodes.handle %--></a> on <!--% latest_episodes.published %--> is flagged as <!--% latest_episodes.is_explicit %--> and released under a <!--% latest_episodes.license %--> license. <br>
<strong>tags:</strong> <em>computer,mobile,bms,power</em>.<br> <strong>tags:</strong> <em>computer,mobile,bms,power</em>.<br>
<small>listen in <a href="local/hpr3628.ogg">ogg</a>, <a href="local/hpr3628.spx">spx</a>, or <a href="local/hpr3628.mp3">mp3</a> format. <small>listen in <a href="local/hpr<!--% latest_episodes.id %-->.ogg">ogg</a>, <a href="local/hpr<!--% latest_episodes.id %-->.spx">spx</a>, or <a href="local/hpr<!--% latest_episodes.id %-->.mp3">mp3</a> format.
<a href="eps.php?id=3628#comments">comments (0)</a></small> <a href="eps.php?id=3628#comments">comments (0)</a></small>
</p> </p>
<!-- INSERT show_notes -->
</header> </header>
<!--% latest_episodes.show_notes %-->
<footer> <footer>
<h2>listen now</h2> <h2>listen now</h2>
<p>duration: 00:20:35</p> <p>duration: 00:20:35</p>
<audio controls preload="none"> <audio controls preload="none">
<source src="local/hpr3628.ogg" type="audio/ogg" > <source src="local/hpr<!--% latest_episodes.id %-->.ogg" type="audio/ogg" >
<source src="local/hpr3628.mp3" type="audio/mpeg" > <source src="local/hpr<!--% latest_episodes.id %-->.mp3" type="audio/mpeg" >
</audio> </audio>
<ul> <ul>
<li>ogg: <a href="local/hpr3628.ogg">/local/hpr3628.ogg</a></li> <li>ogg: <a href="local/hpr<!--% latest_episodes.id %-->.ogg">/local/hpr<!--% latest_episodes.id %-->.ogg</a></li>
<li>spx: <a href="local/hpr3628.spx">/local/hpr3628.spx</a></li> <li>spx: <a href="local/hpr<!--% latest_episodes.id %-->.spx">/local/hpr<!--% latest_episodes.id %-->.spx</a></li>
<li>mp3: <a href="local/hpr3628.mp3">/local/hpr3628.mp3</a></li> <li>mp3: <a href="local/hpr<!--% latest_episodes.id %-->.mp3">/local/hpr<!--% latest_episodes.id %-->.mp3</a></li>
</ul> </ul>
</footer> </footer>
</article> </article>