forked from rho_n/hpr_generator
Calculate date till next available episode slot
This commit is contained in:
parent
7691209360
commit
38d2e7c363
@ -5,9 +5,30 @@
|
|||||||
<header>
|
<header>
|
||||||
<h3>Welcome to HPR the Community Podcast</h3>
|
<h3>Welcome to HPR the Community Podcast</h3>
|
||||||
</header>
|
</header>
|
||||||
|
<!--% days_till_next_episode = 0 %-->
|
||||||
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
|
<!--% FOREACH next_available_episode_result IN DBI.query('
|
||||||
|
WITH next_id AS (SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
|
||||||
|
FROM eps
|
||||||
|
WHERE eps.date > date(\'now\')
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
MIN (next_id.id_next) AS \'next_id\',
|
||||||
|
strftime(\'%Y\', MIN (last_date)) AS \'last_year\',
|
||||||
|
strftime(\'%d\', MIN (last_date)) AS \'last_day\',
|
||||||
|
strftime(\'%m\', MIN (last_date)) AS \'last_month\'
|
||||||
|
FROM next_id
|
||||||
|
LEFT JOIN eps ON next_id.id_next = eps.id
|
||||||
|
WHERE eps.id IS NULL
|
||||||
|
')
|
||||||
|
%-->
|
||||||
|
<!--% USE date %-->
|
||||||
|
<!--% calc = date.calc %-->
|
||||||
|
<!--% days_till_next_episode = calc.Delta_Days(date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d'),next_available_episode_result.last_year,next_available_episode_result.last_month,next_available_episode_result.last_day + 1) %-->
|
||||||
|
<!--% 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>13</strong> days.</p>
|
<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>
|
||||||
<h4>Meet the team</h4>
|
<h4>Meet the team</h4>
|
||||||
<p>
|
<p>
|
||||||
<audio controls preload="none">";
|
<audio controls preload="none">";
|
||||||
@ -19,7 +40,6 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||||
<h1>Latest Shows</h1>
|
<h1>Latest Shows</h1>
|
||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
|
||||||
<!--% FOREACH latest_episodes IN DBI.query('
|
<!--% FOREACH latest_episodes IN DBI.query('
|
||||||
WITH comment_tallies AS (
|
WITH comment_tallies AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user