Archived
4
2

Compare commits

...

2 Commits

Author SHA1 Message Date
Roan Horning
4d34f762d0 Merge pull request '[I43] Integrate twat episodes' (#45) from I43_Today-With-a-Techie-Archived-Shows into main
Reviewed-on: #45
2022-09-17 21:47:38 +00:00
dbd9f8e973
Integrate twat episodes
Add twat shows to the full episodes index, the host pages.
Add individule twat episodes.
2022-09-17 17:28:39 -04:00
7 changed files with 181 additions and 18 deletions

View File

@ -132,6 +132,12 @@ content: content-promote.tpl.html
navigation: navigation-about.tpl.html navigation: navigation-about.tpl.html
content: content-sitemap.tpl.html content: content-sitemap.tpl.html
[twat_episode]
navigation: navigation-get-shows.tpl.html
content: content-twat_episode.tpl.html
multipage: true
filename: eps/twat[id]/index.html
[hpr_ogg] [hpr_ogg]
root_template: rss.tpl.xml root_template: rss.tpl.xml
content: rss-hpr.tpl.xml content: rss-hpr.tpl.xml

View File

@ -2,12 +2,12 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_show_count = DBI.prepare(' <!--% query_hpr_show_count = DBI.prepare('
SELECT id SELECT id
FROM eps FROM eps
WHERE eps.hostid = ? ') WHERE eps.hostid = ? ')
%--> %-->
<!--% query_shows = DBI.prepare(' <!--% query_hpr_shows = DBI.prepare('
SELECT SELECT
eps.id, eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit , CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
@ -24,12 +24,43 @@
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\') WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC ') ORDER BY date DESC ')
%--> %-->
<!--% shows_to_count = query_show_count.execute(id); %--> <!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
<!--% shows = query_shows.execute(id); %--> <!--% hpr_shows = query_hpr_shows.execute(id); %-->
<!--% show_count = 0 %--> <!--% hpr_show_count = 0 %-->
<!--% FOREACH show IN shows_to_count %--> <!--% FOREACH show IN hpr_shows_to_count %-->
<!--% show_count = show_count +1; %--> <!--% hpr_show_count = hpr_show_count +1; %-->
<!--% END %--> <!--% END %-->
<!--% query_twat_show_count = DBI.prepare('
SELECT id
FROM twat_eps AS \'eps\'
WHERE eps.hostid = ? ')
%-->
<!--% query_twat_shows = DBI.prepare('
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid
FROM twat_eps AS eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ?
ORDER BY date DESC
')
%-->
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
<!--% twat_shows = query_twat_shows.execute(id); %-->
<!--% twat_show_count = 0 %-->
<!--% FOREACH show IN twat_shows_to_count %-->
<!--% twat_show_count = twat_show_count +1; %-->
<!--% END %-->
<!--% hosts = DBI.tie('hosts', 'hostid') %--> <!--% hosts = DBI.tie('hosts', 'hostid') %-->
<article> <article>
@ -40,11 +71,15 @@
height="80" alt="Host Image" /><br> height="80" alt="Host Image" /><br>
<label>Host ID</label>: <!--% this_host.hostid %--><br><br> <label>Host ID</label>: <!--% this_host.hostid %--><br><br>
<label>email:</label> <u><!--% this_host.email %--></u><br> <label>email:</label> <u><!--% this_host.email %--></u><br>
<label>episodes:</label> <strong><!--% show_count %--></strong> <label>episodes:</label> <strong><!--% hpr_show_count + twat_show_count %--></strong>
</p> </p>
<!--% FOREACH show IN shows; %--> <!--% FOREACH hpr_show IN hpr_shows; %-->
<!--% show_summary(show, 'hide_host') %--> <!--% show_summary(hpr_show, 'hide_host') %-->
<!--% END %-->
<!--% FOREACH twat_show IN twat_shows; %-->
<!--% twat_show_summary(twat_show, 'hide_host') %-->
<!--% END %--> <!--% END %-->
</article> </article>
<p><a href="contribute.html">Become a Correspondent</a></p> <p><a href="contribute.html">Become a Correspondent</a></p>

View File

@ -25,4 +25,28 @@
%--> %-->
<!--% show_summary(episodes) %--> <!--% show_summary(episodes) %-->
<!--% END %--> <!--% END %-->
<h2 id="twat_episodes">Today With a Techie Archived Shows</h2>
<p>
<!-- Creative Commons License -->
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png" width="88" height="31" /></a><br>The following work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/">Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License</a>.</p>
<p>T.W.A.T. Radio was brought to you by <a href="https://en.wikipedia.org/wiki/Infonomicon">The Infonomicon Computer Club</a></p>
<!--% FOREACH twat_episode IN DBI.query('
SELECT
eps.id,
eps.explicit,
eps.date, eps.license, eps.title, eps.summary,
eps.duration, eps.notes, eps.tags,
hosts.hostid,
hosts.host, hosts.email, hosts.local_image,
miniseries.name AS series, miniseries.id AS seriesid
FROM twat_eps as eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
ORDER BY date DESC
')
%-->
<!--% twat_show_summary(twat_episode) %-->
<!--% END %-->
</article> </article>

View File

@ -28,7 +28,7 @@
<!--% END %--> <!--% END %-->
<!--% USE date %--> <!--% USE date %-->
<!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %--> <!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %-->
<p>We started producing shows as <a href="https://www.hackerpublicradio.org/twat.php"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to HPR then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="https://www.hackerpublicradio.org/calendar.php">released</a> in <strong><!--% days_till_next_episode %--></strong> days.</p> <p>We started producing shows as <a href="<!--% absolute_path(baseurl) %-->eps/index.html#twat_episodes"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to HPR then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="https://www.hackerpublicradio.org/calendar.php">released</a> in <strong><!--% days_till_next_episode %--></strong> days.</p>
<h4>Meet the team</h4> <h4>Meet the team</h4>
<p> <p>
<audio controls preload="none">"; <audio controls preload="none">";

View File

@ -0,0 +1,83 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare('
WITH episode_maxmin AS (
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
FROM twat_eps AS eps
WHERE eps.date < date (\'now\', \'+1 days\')
),
episode_date AS (
SELECT eps.date
FROM twat_eps AS eps
WHERE eps.id = ?
),
episode_previous AS (
SELECT MAX(id) AS \'previous\', ? AS \'id\'
FROM twat_eps AS eps
INNER JOIN episode_date
ON eps.date < episode_date.date
WHERE eps.id > 1
),
episode_next AS (
SELECT MIN(id) AS \'next\', ? AS \'id\'
FROM twat_eps AS eps
INNER JOIN episode_date
ON eps.date > episode_date.date
WHERE eps.date < date (\'now\')
)
SELECT eps.id, eps.date, eps.title, eps.duration,
eps.summary, eps.notes, eps.explicit, eps.license,
eps.tags, eps.version, eps.downloads, eps.valid,
episode_maxmin.latest, episode_maxmin.earliest,
episode_previous.previous, episode_next.next,
hosts.hostid, hosts.host,
miniseries.name AS \'series\', miniseries.id AS \'seriesid\',
miniseries.description AS \'series_description\'
FROM twat_eps AS eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN episode_maxmin ON eps.id = episode_maxmin.id
INNER JOIN episode_previous ON eps.id = episode_previous.id
INNER JOIN episode_next ON eps.id = episode_next.id
WHERE eps.id = ?
')
%-->
<!--% episode_result = query_episodes.execute(id, id, id, id, id) %-->
<!--% FOREACH episode IN episode_result %-->
<!--% episode_navigation = step_navigation(baseurl,episode,"twat") %-->
<article>
<header>
<h1><!--% episode.id %--> :: <!--% episode.title %--></h1>
<h3><!--% episode.summary %--></h3>
<p class="meta"><!--% episode_navigation %-->
</p>
<p><!--% IF get_avatar(episode.hostid) != 'hpr_logo.png' %-->
<img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(episode.hostid) %-->" height="80" width="80" alt="" /></a><br><!--% END %-->
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(episode.hostid) %-->.html"><!--% episode.host %--></a> on <span><!--% episode.date %--></span> is flagged as <span><!--% display_explicit(episode.explicit) %--></span> and is released under a <span><!--% episode.license %--> license</span>. <br>
<!--% display_tags(episode.tags) %--> <br>
<!--% display_listen_in(episode.id) %-->
</p>
<h3><!--% show_series(episode.series, episode.seriesid, "Part of the series") %--></h3>
<p><em><!--% episode.series_description %--></em></p>
</header>
<div><!--% episode.notes %--></div>
<footer>
<h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<audio controls preload="none">
<source src="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.ogg" type="audio/ogg" >
<source src="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.mp3" type="audio/mpeg" >
</audio>
<ul>
<li>ogg: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.ogg">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.ogg</a></li>
<li>spx: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.spx">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.spx</a></li>
<li>mp3: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.mp3">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.mp3</a></li>
</ul>
<p>
<!--% episode_navigation %-->
</p>
</footer></article>
<!--% END %-->

View File

@ -19,9 +19,9 @@ Listen in <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% eps_id %-->.o
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(eps_id) %-->/index.html#comments">Comments (<!--% tally %-->)</a>. <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(eps_id) %-->/index.html#comments">Comments (<!--% tally %-->)</a>.
<!--% END %--> <!--% END %-->
<!--% MACRO show_meta(show) BLOCK %--> <!--% MACRO show_meta(show, hide_tags) BLOCK %-->
<span><label>Released:</label> <!--% show.date %-->.</span> <span><label>Duration:</label> <!--% display_episode_duration(show.duration) %-->.</span> <span><label>Flag:</label> <!--% display_explicit(show.explicit) %-->.</span> <span><!--% show_series(show.series, show.seriesid) %--></span> <br> <span><label>Released:</label> <!--% show.date %-->.</span> <span><label>Duration:</label> <!--% display_episode_duration(show.duration) %-->.</span> <span><label>Flag:</label> <!--% display_explicit(show.explicit) %-->.</span> <span><!--% show_series(show.series, show.seriesid) %--></span> <br>
<!--% display_tags(tags) %--> <!--% IF hide_tags == "" %--><!--% display_tags(tags) %--><!--% END %-->
<!--% END %--> <!--% END %-->
<!--% MACRO show_summary(show, hide_host) BLOCK %--> <!--% MACRO show_summary(show, hide_host) BLOCK %-->
@ -34,3 +34,15 @@ Listen in <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% eps_id %-->.o
<!--% show.summary %--> <!--% show.summary %-->
</p> </p>
<!--% END %--> <!--% END %-->
<!--% MACRO twat_show_summary(show, hide_host) BLOCK %-->
<h3 class="title"><a href="<!--% absolute_path(baseurl) %-->eps/twat<!--% zero_pad_left(show.id) %-->/index.html">twat<!--% show.id %--> :: <!--% show.title %--></a> <!--% IF hide_host == "" %-->
hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(show.hostid) %-->.html"><!--% show.host %--></a>
<!--% END %-->
</h3>
<p class="meta"><!--% show_meta(show) %--><br>
<!--% show.summary %-->
</p>
<!--% END %-->

View File

@ -39,17 +39,20 @@
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->
<!--% MACRO step_navigation(baseurl, links) BLOCK %--> <!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
<small><a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>, <!--% IF folder == "" %-->
<!--% folder = hpr %-->
<!--% END %-->
<small><a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>,
<!--% IF links.previous %--> <!--% IF links.previous %-->
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(links.previous) %-->/index.html" rel="previous">&lt; Previous</a>, <a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.previous) %-->/index.html" rel="previous">&lt; Previous</a>,
<!--% ELSE %--> <!--% ELSE %-->
<span>&lt;</span> Previous, <span>&lt;</span> Previous,
<!--% END %--> <!--% END %-->
<!--% IF links.next %--> <!--% IF links.next %-->
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(links.next) %-->/index.html" rel="next">Next &gt;</a>, <a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.next) %-->/index.html" rel="next">Next &gt;</a>,
<!--% ELSE %--> <!--% ELSE %-->
Next <span>&gt;</span> Next <span>&gt;</span>
<!--% END %--> <!--% END %-->
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small> <a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small>
<!--% END %--> <!--% END %-->