Compare commits
No commits in common. "2a486cb58b04a7175e83a584c51d840648e0f71b" and "0b99483f0d934faf53228fad2169e4884241cb54" have entirely different histories.
2a486cb58b
...
0b99483f0d
Binary file not shown.
Before Width: | Height: | Size: 405 B |
@ -198,7 +198,6 @@ sub get_template_html (\%@) {
|
||||
PRE_CHOMP => 1,
|
||||
POST_CHOMP => 1,
|
||||
CONSTANTS => {
|
||||
database => $_[0]{database},
|
||||
driver => $_[0]{driver},
|
||||
user => $_[0]{user},
|
||||
password => $_[0]{password},
|
||||
|
1
site.cfg
1
site.cfg
@ -2,7 +2,6 @@
|
||||
# with the database.
|
||||
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
|
||||
[DBI]
|
||||
database: mysql
|
||||
driver: dbi:mysql:database=hpr_hpr:hostname=localhost
|
||||
user: hpr-generator
|
||||
password: zBozqN-Z2zNAz
|
||||
|
@ -1,7 +1,6 @@
|
||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<!--% PROCESS "queries-correspondent-${constants.database}.tpl.html" %-->
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% query_hpr_show_count = DBI.prepare('
|
||||
SELECT id
|
||||
@ -9,10 +8,26 @@
|
||||
WHERE eps.hostid = ?
|
||||
')
|
||||
%-->
|
||||
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
|
||||
<!--% query_hpr_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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
')
|
||||
%-->
|
||||
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
|
||||
<!--% hpr_shows = results_hpr_shows.execute(id); %-->
|
||||
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
|
||||
<!--% hpr_show_count = 0 %-->
|
||||
<!--% FOREACH show IN hpr_shows_to_count %-->
|
||||
<!--% hpr_show_count = hpr_show_count +1; %-->
|
||||
|
@ -2,9 +2,57 @@
|
||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
|
||||
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% query_episodes = DBI.prepare(query_episode_maxmin)
|
||||
<!--% query_episodes = DBI.prepare('
|
||||
WITH episode_maxmin AS (
|
||||
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
||||
FROM eps
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
),
|
||||
episode_date AS (
|
||||
SELECT eps.date
|
||||
FROM eps
|
||||
WHERE eps.id = ?
|
||||
),
|
||||
episode_previous AS (
|
||||
SELECT MAX(id) AS \'previous\', ? AS \'id\'
|
||||
FROM 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 eps
|
||||
INNER JOIN episode_date
|
||||
ON eps.date > episode_date.date
|
||||
WHERE eps.date < NOW()
|
||||
),
|
||||
comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
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\',
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM 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
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.id = ?
|
||||
')
|
||||
%-->
|
||||
<!--% episode_result = query_episodes.execute(id, id, id, id, id) %-->
|
||||
<!--% FOREACH episode IN episode_result %-->
|
||||
|
@ -1,5 +1,4 @@
|
||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||
<!--% PROCESS "queries-episodes-${constants.database}.tpl.html" %-->
|
||||
<article>
|
||||
<header>
|
||||
<h1>Complete Archive of Shows.</h1>
|
||||
@ -8,7 +7,21 @@
|
||||
</p>
|
||||
</header>
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH episodes IN DBI.query(query_episodes)
|
||||
<!--% FOREACH episodes 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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
')
|
||||
%-->
|
||||
<!--% show_summary(episodes) %-->
|
||||
<!--% END %-->
|
||||
|
@ -1,16 +1,17 @@
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<hr>
|
||||
<h2><u>The Eleventh Annual 26 Hour New Years Eve Show</u></h2>
|
||||
<!--
|
||||
|
||||
<p>
|
||||
<img src="<!--% absolute_path(baseurl) %-->images/livestream.png" /><br />
|
||||
<img src="livestream.png" /><br />
|
||||
<audio controls autoplay>
|
||||
<source src="https://stream.lugcast.mywire.org/stream" type="audio/mpeg" >
|
||||
<source src="http://shownotes.ooguy.com:8000/stream" type="audio/mpeg" >
|
||||
</audio> <br />
|
||||
<a href="https://stream.lugcast.mywire.org/stream">https://stream.lugcast.mywire.org/stream</a><br />
|
||||
<a href="http://shownotes.ooguy.com:8000/stream">http://shownotes.ooguy.com:8000/stream.m3u</a><br />
|
||||
<a href="https://hackerpublicradio.org/live">https://hackerpublicradio.org/live</a><br />
|
||||
</p>
|
||||
|
||||
-->
|
||||
<h3>Welcome every <a href="https://www.timeanddate.com/counters/multicountdown.html">TimeZone</a>!</h3>
|
||||
|
||||
<p><em>If you keep talking, we'll keep recording.</em> </p>
|
||||
@ -33,11 +34,11 @@ Channel: <strong>HPR</strong></p>
|
||||
|
||||
<p>For those who have never used Mumble before, see this <a href="<!--% absolute_path(baseurl) %-->mumble-howto.html">how-to explaining the setup of the desktop Mumble client</a>, or listen to <a href="<!--% absolute_path(baseurl) %-->eps/hpr3503/index.html">hpr3503 :: Configuring Mumble</a>.</p>
|
||||
|
||||
<h3>Add to the Show-notes</h3>
|
||||
<!--<h3>Add to the Show-notes</h3>
|
||||
|
||||
<p>
|
||||
<strong>Please help fill out the show notes</strong><br />
|
||||
<a href="https://shownotes.lugcast.mywire.org/p/hpr-nye-2022">https://shownotes.lugcast.mywire.org/p/hpr-nye-2022</a><br />
|
||||
<a href="http://shownotes.ooguy.com:9001/p/HPR-NYE-2022">http://shownotes.ooguy.com:9001/p/HPR-NYE-2022</a><br />
|
||||
We are using Etherpad for people to share links and info to things they are discussing. The Etherpad will be used for the HPR audio shownotes so please feel free to add to it. The entire event will be broken into 2 to 3 hour segments and made available as HPR episodes.<br/>
|
||||
<em>This really, really helps us out to post the show faster !</em>
|
||||
</p>
|
||||
@ -48,9 +49,9 @@ We are using Etherpad for people to share links and info to things they are disc
|
||||
We're going to release the show as a podcast, so it would be great if you could grab a copy as a backup.
|
||||
|
||||
<pre>
|
||||
while true;do timestamp="$HOSTNAME-$(\date -u +%Y-%m-%d_%H-%M-%SZ_%A)"; echo "Recording ${timestamp}";cvlc "https://stream.lugcast.mywire.org/stream" --sout "file/mp3:${timestamp}.mp3" --run-time="3600" vlc://quit;done
|
||||
while true;do timestamp="$HOSTNAME-$(\date -u +%Y-%m-%d_%H-%M-%SZ_%A)"; echo "Recording ${timestamp}";cvlc "http://shownotes.ooguy.com:8000/stream.m3u" --sout "file/mp3:${timestamp}.mp3" --run-time="3600" vlc://quit;done
|
||||
</pre>
|
||||
</p>
|
||||
</p>-->
|
||||
|
||||
<!--
|
||||
while true;do ffmpeg -i https://hackerpublicradio.org/live -c copy hprnye-$( \date -u +%s )-$( \date -u +%Y%m%dT%H%M%SZ )-${HOSTNAME}.mp3; done
|
||||
@ -58,6 +59,7 @@ while true;do ffmpeg -i https://hackerpublicradio.org/live -c copy hprnye-$( \da
|
||||
<p>
|
||||
The show will be held on the <a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0">HPR Room on Mumble</a>, so now you can prepare by installing the <a href="https://wiki.mumble.info/wiki/Main_Page">mumble PC Client</a>, or the <a href="https://f-droid.org/packages/se.lublin.mumla">mumla Android Client</a>. The Server we will use is: <strong>chatter.skyehaven.net</strong>, Port: <strong>64738</strong>, Channel: <strong>HPR</strong>
|
||||
</p>
|
||||
-->
|
||||
|
||||
<h3>Spread the Word</h3>
|
||||
|
||||
@ -67,6 +69,7 @@ The show will be held on the <a href="mumble://chatter.skyehaven.net:64738/Hacke
|
||||
<source src="https://hackerpublicradio.org/promote/new-year-show-promo.mp3" type="audio/mpeg" >
|
||||
</audio></p>
|
||||
|
||||
<!--
|
||||
<p>
|
||||
If you prefer to just listen to the show and not participate using Mumble, use the link below for the live audio stream using your web browser or favorite audio application such as VLC, or live in your web browser.<br/>
|
||||
</p>
|
||||
|
@ -1,9 +1,7 @@
|
||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-call_for_shows.tpl.html' %-->
|
||||
<!--% INCLUDE 'content-index-announcement.tpl.html' %-->
|
||||
<!--% PROCESS "queries-index-${constants.database}.tpl.html" %-->
|
||||
<hr>
|
||||
<article>
|
||||
<header>
|
||||
@ -11,7 +9,21 @@
|
||||
</header>
|
||||
<!--% days_till_next_episode = 0 %-->
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH next_available_episode_result IN DBI.query(query_next_available_episode)
|
||||
<!--% 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 > NOW()
|
||||
)
|
||||
SELECT
|
||||
MIN(next_id.id_next) AS \'next_id\',
|
||||
DATE_FORMAT(MIN(last_date), \'%Y\') AS \'last_year\',
|
||||
DATE_FORMAT(MIN(last_date), \'%d\') AS \'last_day\',
|
||||
DATE_FORMAT(MIN(last_date), \'%m\') 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 %-->
|
||||
@ -20,9 +32,6 @@
|
||||
<!--% 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')) %-->
|
||||
<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>
|
||||
</article>
|
||||
<!--% display_call_for_shows() %-->
|
||||
<article>
|
||||
<h4>Meet the team</h4>
|
||||
<p>
|
||||
<audio controls preload="none">";
|
||||
@ -34,7 +43,33 @@
|
||||
<hr>
|
||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||
<h1>Latest Shows</h1>
|
||||
<!--% FOREACH latest_episodes IN DBI.query(query_latest_episodes)
|
||||
<!--% FOREACH latest_episodes IN DBI.query('
|
||||
WITH comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
SELECT
|
||||
eps.id,
|
||||
eps.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,
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
LIMIT 10
|
||||
')
|
||||
%-->
|
||||
<hr>
|
||||
<article>
|
||||
@ -60,7 +95,22 @@
|
||||
<hr>
|
||||
<h1>Previous five weeks</h1>
|
||||
</header>
|
||||
<!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes)
|
||||
<!--% FOREACH last_5_weeks_episodes IN DBI.query('
|
||||
SELECT
|
||||
eps.id,
|
||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS 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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
LIMIT 30 OFFSET 10
|
||||
')
|
||||
%-->
|
||||
<!--% show_summary(last_5_weeks_episodes) %-->
|
||||
<!--% END %-->
|
||||
|
@ -7,6 +7,7 @@
|
||||
WITH episode_maxmin AS (
|
||||
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
||||
FROM twat_eps AS eps
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
),
|
||||
episode_date AS (
|
||||
SELECT eps.date
|
||||
@ -25,6 +26,7 @@
|
||||
FROM twat_eps AS eps
|
||||
INNER JOIN episode_date
|
||||
ON eps.date > episode_date.date
|
||||
WHERE eps.date < NOW()
|
||||
)
|
||||
SELECT eps.id, eps.date, eps.title, eps.duration,
|
||||
eps.summary, eps.notes, eps.explicit, eps.license,
|
||||
|
@ -1,6 +1,8 @@
|
||||
<!--% PROCESS "queries-ids-episode-${constants.database}.tpl.html" %-->
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH episode IN DBI.query(query_ids_episode) %-->
|
||||
<!--% FOREACH episode IN DBI.query(
|
||||
'select eps.id from eps
|
||||
where eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) '
|
||||
) %-->
|
||||
,<!--% episode.id %-->
|
||||
<!--% END %-->
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH episode IN DBI.query(
|
||||
'select eps.id from twat_eps AS eps'
|
||||
'select eps.id from twat_eps AS eps
|
||||
where eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) '
|
||||
) %-->
|
||||
,<!--% episode.id %-->
|
||||
<!--% END %-->
|
||||
|
@ -1,6 +0,0 @@
|
||||
<!--% query_call_for_shows = '
|
||||
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
|
||||
FROM eps
|
||||
WHERE eps.date > NOW() AND eps.date < DATE_ADD(NOW(), INTERVAL 10 DAY)
|
||||
'
|
||||
%-->
|
@ -1,6 +0,0 @@
|
||||
<!--% query_call_for_shows = '
|
||||
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
|
||||
FROM eps
|
||||
WHERE eps.date > date(\'now\') AND eps.date < date(\'now\', \'+10 days\')
|
||||
'
|
||||
%-->
|
@ -1,18 +0,0 @@
|
||||
<!--% query_hpr_shows = '
|
||||
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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
'
|
||||
%-->
|
@ -1,18 +0,0 @@
|
||||
<!--% query_hpr_shows = '
|
||||
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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
|
||||
ORDER BY eps.id + 0 DESC
|
||||
'
|
||||
%-->
|
@ -1,51 +0,0 @@
|
||||
<!--% query_episode_maxmin = '
|
||||
WITH episode_maxmin AS (
|
||||
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
||||
FROM eps
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
),
|
||||
episode_date AS (
|
||||
SELECT eps.date
|
||||
FROM eps
|
||||
WHERE eps.id = ?
|
||||
),
|
||||
episode_previous AS (
|
||||
SELECT MAX(id) AS \'previous\', ? AS \'id\'
|
||||
FROM 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 eps
|
||||
INNER JOIN episode_date
|
||||
ON eps.date > episode_date.date
|
||||
WHERE eps.date < NOW()
|
||||
),
|
||||
comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
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\',
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM 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
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.id = ?
|
||||
'
|
||||
%-->
|
@ -1,51 +0,0 @@
|
||||
<!--% query_episode_maxmin = '
|
||||
WITH episode_maxmin AS (
|
||||
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
||||
FROM eps
|
||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||
),
|
||||
episode_date AS (
|
||||
SELECT eps.date
|
||||
FROM eps
|
||||
WHERE eps.id = ?
|
||||
),
|
||||
episode_previous AS (
|
||||
SELECT MAX(id) AS \'previous\', ? AS \'id\'
|
||||
FROM 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 eps
|
||||
INNER JOIN episode_date
|
||||
ON eps.date > episode_date.date
|
||||
WHERE eps.date < date(\'now\')
|
||||
),
|
||||
comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
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\',
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM 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
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.id = ?
|
||||
'
|
||||
%-->
|
@ -1,15 +0,0 @@
|
||||
<!--% query_episodes = '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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC'
|
||||
%-->
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!--% query_episodes = '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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||
ORDER BY eps.id + 0 DESC'
|
||||
%-->
|
||||
|
@ -1,4 +0,0 @@
|
||||
<!--% query_ids_episode = 'select eps.id from eps
|
||||
where eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) '
|
||||
%-->
|
||||
|
@ -1,4 +0,0 @@
|
||||
<!--% query_ids_episode = 'select eps.id from eps
|
||||
where eps.date < date(\'now\', \'+1 days\')'
|
||||
%-->
|
||||
|
@ -1,62 +0,0 @@
|
||||
<!--% query_next_available_episode = '
|
||||
WITH next_id AS (
|
||||
SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
|
||||
FROM eps
|
||||
WHERE eps.date > NOW()
|
||||
)
|
||||
SELECT
|
||||
MIN(next_id.id_next) AS \'next_id\',
|
||||
DATE_FORMAT(MIN(last_date), \'%Y\') AS \'last_year\',
|
||||
DATE_FORMAT(MIN(last_date), \'%d\') AS \'last_day\',
|
||||
DATE_FORMAT(MIN(last_date), \'%m\') AS \'last_month\'
|
||||
FROM next_id
|
||||
LEFT JOIN eps ON next_id.id_next = eps.id
|
||||
WHERE eps.id IS NULL
|
||||
'
|
||||
%-->
|
||||
<!--% query_latest_episodes = '
|
||||
WITH comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
SELECT
|
||||
eps.id,
|
||||
eps.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,
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
LIMIT 10
|
||||
'
|
||||
%-->
|
||||
<!--% query_last_5_weeks_episodes = '
|
||||
SELECT
|
||||
eps.id,
|
||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS 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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||
ORDER BY eps.id DESC
|
||||
LIMIT 30 OFFSET 10
|
||||
'
|
||||
%-->
|
||||
|
@ -1,62 +0,0 @@
|
||||
<!--% query_next_available_episode = '
|
||||
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
|
||||
'
|
||||
%-->
|
||||
<!--% query_latest_episodes = '
|
||||
WITH comment_tallies AS (
|
||||
SELECT
|
||||
eps_id,
|
||||
COUNT(eps_id) AS eps_tally
|
||||
FROM comments
|
||||
GROUP BY eps_id
|
||||
)
|
||||
SELECT
|
||||
eps.id,
|
||||
eps.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,
|
||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||
FROM eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||
ORDER BY eps.id + 0 DESC
|
||||
LIMIT 10
|
||||
'
|
||||
%-->
|
||||
<!--% query_last_5_weeks_episodes = '
|
||||
SELECT
|
||||
eps.id,
|
||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS 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 eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||
ORDER BY eps.id + 0 DESC
|
||||
LIMIT 30 OFFSET 10
|
||||
'
|
||||
%-->
|
||||
|
@ -1,18 +0,0 @@
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<!--% PROCESS "queries-call_for_shows-${constants.database}.tpl.html" %-->
|
||||
<!--% MACRO display_call_for_shows BLOCK %-->
|
||||
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows)
|
||||
%-->
|
||||
<!--% results_call_for_shows = result_call_for_shows.execute().get_all() %-->
|
||||
<!--% IF results_call_for_shows.0.request_for_shows == 1 %-->
|
||||
<!--% USE date %-->
|
||||
<article>
|
||||
<header>
|
||||
<h3>Call for shows</h3>
|
||||
</header>
|
||||
<p><strong><em>We are running very low on shows</em></strong> at the moment. Have a look at the <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">hosts</a> page and if you don't see "<!--% date.format(date.now, '%Y') %-->-??-??" next to your name, or if your name is not listed, you might consider sending us in something.</p>
|
||||
<!-- <img src="/images/hprstats.png" alt="hpr queue showing an graph showing how few shows we have" /> -->
|
||||
<p>There are no files to process on the FTP server.</p>
|
||||
</article>
|
||||
<!--% END %-->
|
||||
<!--% END %-->
|
Reference in New Issue
Block a user