Changes to get the site working

This commit is contained in:
Ken Fallon 2023-06-17 22:04:35 +02:00
parent 62c7323847
commit 726ac57989
7 changed files with 126 additions and 119 deletions

View File

@ -1,10 +1,12 @@
# Configure the Perl DBI driver to allow the templates communicate
# with the database.
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
# For more information on Perl Template Toolkit see:
# http://template-toolkit.org/docs/manual/index.html
[DBI]
# Configuration settings for SQLite
#database: sqlite
#driver: dbi:SQLite:hpr.db
database: sqlite
driver: dbi:SQLite:hpr.db
#user: (not used - leave blank)
#password: (not used - leave blank)
# Configuration settings for MySQL
@ -25,9 +27,12 @@ output_path: ./public_html
[root_template]
content: page.tpl.html
#baseurl: OPTIONAL [i.e. file://<full path to local website directory>]
baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/
hub_baseurl: http://hub.hackerpublicradio.com/
#baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/
baseurl: https://hackerpublicradio.org/
hub_baseurl: https://hub.hackerpublicradio.org/
media_baseurl: https://archive.org/download/hpr$eps_id/
generator_name: The HPR Robot
generator_email: robot.nospam@nospam.hackerpublicradio.org
# Configure the navigation menu and the content templates for each page
# of the site:
@ -166,43 +171,43 @@ content: content-mumble-howto.tpl.html
navigation: navigation-about.tpl.html
content: content-comments_viewer.tpl.html
[hpr_ogg]
root_template: rss.tpl.xml
content: rss-hpr.tpl.xml
filename: hpr_ogg.rss
media_file_extension: ogg
[hpr_mp3]
root_template: rss.tpl.xml
content: rss-hpr.tpl.xml
filename: hpr_mp3.rss
media_file_extension: mp3
audio_mime_type: mpeg
[hpr_spx]
root_template: rss.tpl.xml
content: rss-hpr.tpl.xml
filename: hpr_spx.rss
media_file_extension: spx
[hpr_total_ogg]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_ogg.rss
media_file_extension: ogg
[hpr_total_mp3]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_mp3.rss
media_file_extension: mp3
audio_mime_type: mpeg
[hpr_total_spx]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_spx.rss
media_file_extension: spx
# [hpr_ogg]
# root_template: rss.tpl.xml
# content: rss-hpr.tpl.xml
# filename: hpr_ogg.rss
# media_file_extension: ogg
#
# [hpr_mp3]
# root_template: rss.tpl.xml
# content: rss-hpr.tpl.xml
# filename: hpr_mp3.rss
# media_file_extension: mp3
# audio_mime_type: mpeg
#
# [hpr_spx]
# root_template: rss.tpl.xml
# content: rss-hpr.tpl.xml
# filename: hpr_spx.rss
# media_file_extension: spx
#
# [hpr_total_ogg]
# root_template: rss.tpl.xml
# content: rss-hpr_total.tpl.xml
# filename: hpr_total_ogg.rss
# media_file_extension: ogg
#
# [hpr_total_mp3]
# root_template: rss.tpl.xml
# content: rss-hpr_total.tpl.xml
# filename: hpr_total_mp3.rss
# media_file_extension: mp3
# audio_mime_type: mpeg
#
# [hpr_total_spx]
# root_template: rss.tpl.xml
# content: rss-hpr_total.tpl.xml
# filename: hpr_total_spx.rss
# media_file_extension: spx
[comments]
root_template: rss-comments.tpl.xml

View File

@ -68,7 +68,7 @@ Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss
<strong>Note to Spammers</strong><br />
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> a show about yourself, or your industry, or any other topic we may find interesting. <em>We also check shows for spam :)</em>.
</p>
<form method="POST" action="comment_confirm.php">
<form method="POST" action="<!--% hub_baseurl %-->comment_confirm.php">
<fieldset>
<legend>Provide feedback</legend>
<table>
@ -91,9 +91,9 @@ Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss
<input required type="text" name="anti_spam_question" size="50" maxlength="100" placeholder="Type out what the P in HPR stands for."></td>
</tr>
<input type="hidden" name="spammer" value="No">
<input type="hidden" name="hostid" value="406">
<input type="hidden" name="justification" value="No justification is asked for or required.">
<input type="hidden" name="eps_id" value="3665 ">
<input type="hidden" name="hostid" value="<!--% episode.hostid %-->">
<input type="hidden" name="justification" value="No justification is asked for or required.">
<input type="hidden" name="eps_id" value="<!--% episode.id %-->">
</table>
<input type="submit" value="Next">
</fieldset>

View File

@ -41,15 +41,6 @@
<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="<!--% hub_baseurl %-->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">";
<source src="<!--% absolute_path(baseurl) %-->media/promos/all-hpr-hosts.ogg" type="audio/ogg" >
<source src="<!--% absolute_path(baseurl) %-->media/promos/all-hpr-hosts.mp3" type="audio/mpeg" >
</audio>
</p>
</article>
<hr>
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<h1>Latest Shows</h1>

View File

@ -21,9 +21,9 @@
Every month, the HPR Janitors put down their mops had have a chat about all the shows, and what else has been going on in the HPR community. This is a regular show scheduled for the first Monday of the month.
</p>
<ul>
<li><a href="https://hackerpublicradio.org/hpr_ogg_rss.php?series=47">ogg</a> Larger file size higher quality feed.</li>
<li><a href="https://hackerpublicradio.org/hpr_spx_rss.php?series=47">mp3</a> Larger file size regular quality feed in a common format.</li>
<li><a href="https://hackerpublicradio.org/hpr_mp3_rss.php?series=47">spx</a> Small file size lower quality feed. <br/>Ideal for dial-up/mobile connections.</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php?series=47">ogg</a> Larger file size higher quality feed.</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_spx_rss.php?series=47">mp3</a> Larger file size regular quality feed in a common format.</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php?series=47">spx</a> Small file size lower quality feed. <br/>Ideal for dial-up/mobile connections.</li>
</ul>
<p>
We also maintain an <a href="https://archive.org/details/hackerpublicradio?and[]=subject%3A%22Community+News%22">Archive.org</a> page where you can get the shows in even more formats.
@ -54,9 +54,9 @@
Use this feed to get the archived episodes. The feed themselves run over 15Mb in size and so use them to download the archived episodes and when you are up to date switch back to the Two Week Feeds listed above.
</p>
<ul>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_ogg.rss">ogg feed</a> Warning over 50G</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_spx.rss">spx feed</a> Warning over 22G</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_mp3.rss">mp3 feed</a> Warning over 36G</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_ogg_rss.php">ogg feed</a> Warning over 50G</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_spx_rss.php">spx feed</a> Warning over 22G</li>
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_rss.php">mp3 feed</a> Warning over 36G</li>
</ul>
</article>
<article>
@ -67,7 +67,7 @@
Use this feed to get the shows as they are posted. The shows will be posted out of order as they come in and may be replaced/reposted if errors are found. This is intended as a means to provide find issues with metadata or the audio quality of new shows before they hit the main feed.
</p>
<ul>
<li><a href="https://www.hackerpublicradio.org/rss-future.php">Shows as they are posted.</a> OGG Only</li>
<li><a href="<!--% absolute_path(baseurl) %-->rss-future.php">Shows as they are posted.</a> OGG Only</li>
</ul>
</article>
<article>

View File

@ -23,10 +23,10 @@
}
</style>
<link rel="shortcut icon" href="hpr.ico" >
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Ogg Vorbis RSS" href="<!--% absolute_path(baseurl) %-->hpr_ogg.rss" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Speex RSS" href="<!--% absolute_path(baseurl) %-->hpr_spx.rss" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio MP3 RSS" href="<!--% absolute_path(baseurl) %-->hpr_mp3.rss" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Comments RSS" href="<!--% hub_baseurl %-->comments_rss.php" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Ogg Vorbis RSS" href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Speex RSS" href="<!--% absolute_path(baseurl) %-->hpr_spx_rss.php" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio MP3 RSS" href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Comments RSS" href="<!--% absolute_path(baseurl) %-->comments.rss" />
<link rel="license" title="cc by 3.0" href="https://creativecommons.org/licenses/by-sa/3.0/" />
<link href="<!--% absolute_path(baseurl) %-->css/hpr.css" rel="stylesheet" />
<!--[if IE]>
@ -51,8 +51,9 @@
<a href="<!--% absolute_path(baseurl) %-->syndication.html">R</a>adio
</h1>
<h2>Your ideas, projects, opinions - podcasted.</h2>
<h3>New episodes every weekday Monday through Friday.<br />
<h3>New episodes every weekday Monday through Friday.<br />
<em><small>This page was <a href="https://repo.anhonesthost.net/rho_n/hpr_generator">generated</a> by <a href="mailto:<!--% generator_email %-->"><!--% generator_name %--></a> at <time dateTime="<!--% format_iso8601_date(date.now) %-->"><!--% format_feed_date(date.now) %--></time></small></em></h3>
</div>
<hr />

View File

@ -1,59 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" >
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% USE date %-->
<channel>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link>
<description>Comments Feed: Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.</description>
<language>en-us</language>
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
<managingEditor>feedback.nospam@nospam.hackerpublicradio.org (HPR Feedback)</managingEditor>
<webMaster>admin.nospam@nospam.hackerpublicradio.org (HPR Webmaster)</webMaster>
<generator>hpr_generator</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<ttl>600</ttl>
<image>
<url><!--% baseurl %-->images/hpr_feed_small.png</url>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link>
<description>The Hacker Public Radio Old Microphone Logo</description>
<height>164</height>
<width>144</width>
</image>
<atom:link href="<!--% baseurl %-->comments.rss" rel="self" type="application/rss+xml" />
<pubDate><!--% format_feed_date(date.now) %--></pubDate>
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH item IN DBI.query('
SELECT C.*,
H.host, H.hostid AS host_id,
E.title AS episode_title,
E.date AS episode_date,
E.duration AS episode_duration,
M.id AS series_id, M.name AS series_name
FROM comments AS C
INNER JOIN eps AS E
ON C.eps_id = E.id
INNER JOIN hosts AS H
ON E.hostid = H.hostid
INNER JOIN miniseries AS M
ON E.series = M.id
ORDER BY C.comment_timestamp DESC
LIMIT 30
')
%-->
<channel>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link>
<description>Comments Feed: Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.</description>
<language>en-us</language>
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
<managingEditor>feedback.nospam@nospam.hackerpublicradio.org (HPR Feedback)</managingEditor>
<webMaster>admin.nospam@nospam.hackerpublicradio.org (HPR Webmaster)</webMaster>
<generator>https://repo.anhonesthost.net/rho_n/hpr_generator</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<ttl>600</ttl>
<image>
<url><!--% baseurl %-->images/hpr_feed_small.png</url>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link>
<description>The Hacker Public Radio Old Microphone Logo</description>
<height>164</height>
<width>144</width>
</image>
<atom:link href="<!--% baseurl %-->comments.rss" rel="self" type="application/rss+xml" />
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH response IN DBI.query('SELECT max( comment_timestamp) AS latest_update FROM comments') %-->
<pubDate><!--% format_feed_date(response.latest_update) %--></pubDate>
<!--% END %-->
<!--% FOREACH item IN DBI.query('
SELECT C.*,
H.host, H.hostid AS host_id,
E.title AS episode_title,
E.date AS episode_date,
E.duration AS episode_duration,
M.id AS series_id, M.name AS series_name
FROM comments AS C
INNER JOIN eps AS E
ON C.eps_id = E.id
INNER JOIN hosts AS H
ON E.hostid = H.hostid
INNER JOIN miniseries AS M
ON E.series = M.id
ORDER BY C.comment_timestamp DESC
LIMIT 30
')
%-->
<item>
<title><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></title>
<author>feedback.nospam@nospam.hackerpublicradio.org (<!--% item.comment_author_name %-->)</author>
<link><!--% baseurl %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comments</link>
<description><![CDATA[<strong>RE: hpr<!--% zero_pad_left(item.eps_id) %-->::<!--% item.episode_date %--> <em><!--% item.episode_title %--></em> by <a href="<!--% baseurl %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a></strong><!--% rss_show_series(item.series_name, item.series_id) %--><br />
<!--% display_episode_duration(item.episode_duration) %--><!--% display_listen_in(item.eps_id) %--><br /><!--% item.comment_text %-->
<item>
<title><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></title>
<author>feedback.nospam@nospam.hackerpublicradio.org (<!--% item.comment_author_name %-->)</author>
<link><!--% baseurl %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comments</link>
<description><![CDATA[<strong>
RE: hpr<!--% zero_pad_left(item.eps_id) %-->::<!--% item.episode_date %--> <em><!--% item.episode_title %--></em> by <a href="<!--% baseurl %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a></strong><!--% rss_show_series(item.series_name, item.series_id) %--><br />
<!--% display_episode_duration(item.episode_duration) %--><!--% display_listen_in(item.eps_id) %--><br /><!--% item.comment_text FILTER html_line_break %-->
]]></description>
<pubDate><!--% format_feed_date(item.comment_timestamp) %--></pubDate>
<guid isPermaLink="false"><!--% baseurl %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comment_<!--% item.id %--></guid>
</item>
<!--% END %-->
</channel>
<pubDate><!--% format_feed_date(item.comment_timestamp) %--></pubDate>
<guid isPermaLink="false"><!--% baseurl %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comment_<!--% item.id %--></guid>
</item>
<!--% END %-->
</channel>
</rss>

View File

@ -40,6 +40,11 @@
<!--% feed_date.format(date_to_format) %-->
<!--% END %-->
<!--% MACRO format_iso8601_date(date_to_format) BLOCK %-->
<!--% USE iso8601_date = date(format = '%Y-%m-%dT%H:%M:%SZ', gmt=1) %-->
<!--% iso8601_date.format(date_to_format) %-->
<!--% END %-->
<!--% MACRO absolute_path(baseurl) BLOCK %-->
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %-->