Merge pull request 'I118 Changes to get the site working' (#125) from I118_Changes_necessary_to_complete_the_migration_to_live into main

Reviewed-on: rho_n/hpr_generator#125
This commit is contained in:
Ken Fallon 2023-06-22 16:48:45 +00:00
commit 0229b913db
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 # Configure the Perl DBI driver to allow the templates communicate
# with the database. # with the database.
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name> # 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] [DBI]
# Configuration settings for SQLite # Configuration settings for SQLite
#database: sqlite database: sqlite
#driver: dbi:SQLite:hpr.db driver: dbi:SQLite:hpr.db
#user: (not used - leave blank) #user: (not used - leave blank)
#password: (not used - leave blank) #password: (not used - leave blank)
# Configuration settings for MySQL # Configuration settings for MySQL
@ -25,9 +27,12 @@ output_path: ./public_html
[root_template] [root_template]
content: page.tpl.html content: page.tpl.html
#baseurl: OPTIONAL [i.e. file://<full path to local website directory>] #baseurl: OPTIONAL [i.e. file://<full path to local website directory>]
baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/ #baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/
hub_baseurl: http://hub.hackerpublicradio.com/ baseurl: https://hackerpublicradio.org/
hub_baseurl: https://hub.hackerpublicradio.org/
media_baseurl: https://archive.org/download/hpr$eps_id/ 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 # Configure the navigation menu and the content templates for each page
# of the site: # of the site:
@ -166,43 +171,43 @@ content: content-mumble-howto.tpl.html
navigation: navigation-about.tpl.html navigation: navigation-about.tpl.html
content: content-comments_viewer.tpl.html content: content-comments_viewer.tpl.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
filename: hpr_ogg.rss # filename: hpr_ogg.rss
media_file_extension: ogg # media_file_extension: ogg
#
[hpr_mp3] # [hpr_mp3]
root_template: rss.tpl.xml # root_template: rss.tpl.xml
content: rss-hpr.tpl.xml # content: rss-hpr.tpl.xml
filename: hpr_mp3.rss # filename: hpr_mp3.rss
media_file_extension: mp3 # media_file_extension: mp3
audio_mime_type: mpeg # audio_mime_type: mpeg
#
[hpr_spx] # [hpr_spx]
root_template: rss.tpl.xml # root_template: rss.tpl.xml
content: rss-hpr.tpl.xml # content: rss-hpr.tpl.xml
filename: hpr_spx.rss # filename: hpr_spx.rss
media_file_extension: spx # media_file_extension: spx
#
[hpr_total_ogg] # [hpr_total_ogg]
root_template: rss.tpl.xml # root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml # content: rss-hpr_total.tpl.xml
filename: hpr_total_ogg.rss # filename: hpr_total_ogg.rss
media_file_extension: ogg # media_file_extension: ogg
#
[hpr_total_mp3] # [hpr_total_mp3]
root_template: rss.tpl.xml # root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml # content: rss-hpr_total.tpl.xml
filename: hpr_total_mp3.rss # filename: hpr_total_mp3.rss
media_file_extension: mp3 # media_file_extension: mp3
audio_mime_type: mpeg # audio_mime_type: mpeg
#
[hpr_total_spx] # [hpr_total_spx]
root_template: rss.tpl.xml # root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml # content: rss-hpr_total.tpl.xml
filename: hpr_total_spx.rss # filename: hpr_total_spx.rss
media_file_extension: spx # media_file_extension: spx
[comments] [comments]
root_template: rss-comments.tpl.xml 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 /> <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>. 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> </p>
<form method="POST" action="comment_confirm.php"> <form method="POST" action="<!--% hub_baseurl %-->comment_confirm.php">
<fieldset> <fieldset>
<legend>Provide feedback</legend> <legend>Provide feedback</legend>
<table> <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> <input required type="text" name="anti_spam_question" size="50" maxlength="100" placeholder="Type out what the P in HPR stands for."></td>
</tr> </tr>
<input type="hidden" name="spammer" value="No"> <input type="hidden" name="spammer" value="No">
<input type="hidden" name="hostid" value="406"> <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="justification" value="No justification is asked for or required.">
<input type="hidden" name="eps_id" value="3665 "> <input type="hidden" name="eps_id" value="<!--% episode.id %-->">
</table> </table>
<input type="submit" value="Next"> <input type="submit" value="Next">
</fieldset> </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> <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> </article>
<!--% display_call_for_shows() %--> <!--% 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> <hr>
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<h1>Latest Shows</h1> <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. 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> </p>
<ul> <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="<!--% absolute_path(baseurl) %-->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="<!--% 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="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_mp3_rss.php?series=47">spx</a> Small file size lower quality feed. <br/>Ideal for dial-up/mobile connections.</li>
</ul> </ul>
<p> <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. 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. 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> </p>
<ul> <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_ogg_rss.php">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_spx_rss.php">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_rss.php">mp3 feed</a> Warning over 36G</li>
</ul> </ul>
</article> </article>
<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. 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> </p>
<ul> <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> </ul>
</article> </article>
<article> <article>

View File

@ -23,10 +23,10 @@
} }
</style> </style>
<link rel="shortcut icon" href="hpr.ico" > <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 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" /> <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" /> <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="<!--% hub_baseurl %-->comments_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 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" /> <link href="<!--% absolute_path(baseurl) %-->css/hpr.css" rel="stylesheet" />
<!--[if IE]> <!--[if IE]>
@ -51,8 +51,9 @@
<a href="<!--% absolute_path(baseurl) %-->syndication.html">R</a>adio <a href="<!--% absolute_path(baseurl) %-->syndication.html">R</a>adio
</h1> </h1>
<h2>Your ideas, projects, opinions - podcasted.</h2> <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> <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> </div>
<hr /> <hr />

View File

@ -3,57 +3,62 @@
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% USE date %--> <!--% USE date %-->
<channel> <channel>
<title>Hacker Public Radio ~ Comment Feed</title> <title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link> <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> <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> <language>en-us</language>
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright> <copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
<managingEditor>feedback.nospam@nospam.hackerpublicradio.org (HPR Feedback)</managingEditor> <managingEditor>feedback.nospam@nospam.hackerpublicradio.org (HPR Feedback)</managingEditor>
<webMaster>admin.nospam@nospam.hackerpublicradio.org (HPR Webmaster)</webMaster> <webMaster>admin.nospam@nospam.hackerpublicradio.org (HPR Webmaster)</webMaster>
<generator>hpr_generator</generator> <generator>https://repo.anhonesthost.net/rho_n/hpr_generator</generator>
<docs>http://www.rssboard.org/rss-specification</docs> <docs>http://www.rssboard.org/rss-specification</docs>
<ttl>600</ttl> <ttl>600</ttl>
<image> <image>
<url><!--% baseurl %-->images/hpr_feed_small.png</url> <url><!--% baseurl %-->images/hpr_feed_small.png</url>
<title>Hacker Public Radio ~ Comment Feed</title> <title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% baseurl %-->about.html</link> <link><!--% baseurl %-->about.html</link>
<description>The Hacker Public Radio Old Microphone Logo</description> <description>The Hacker Public Radio Old Microphone Logo</description>
<height>164</height> <height>164</height>
<width>144</width> <width>144</width>
</image> </image>
<atom:link href="<!--% baseurl %-->comments.rss" rel="self" type="application/rss+xml" /> <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) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% FOREACH response IN DBI.query('SELECT max( comment_timestamp) AS latest_update FROM comments') %-->
<!--% 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> <pubDate><!--% format_feed_date(response.latest_update) %--></pubDate>
<title><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></title> <!--% END %-->
<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> <!--% FOREACH item IN DBI.query('
<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 /> SELECT C.*,
<!--% display_episode_duration(item.episode_duration) %--><!--% display_listen_in(item.eps_id) %--><br /><!--% item.comment_text %--> 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 FILTER html_line_break %-->
]]></description> ]]></description>
<pubDate><!--% format_feed_date(item.comment_timestamp) %--></pubDate> <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> <guid isPermaLink="false"><!--% baseurl %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comment_<!--% item.id %--></guid>
</item> </item>
<!--% END %--> <!--% END %-->
</channel> </channel>
</rss> </rss>

View File

@ -40,6 +40,11 @@
<!--% feed_date.format(date_to_format) %--> <!--% feed_date.format(date_to_format) %-->
<!--% END %--> <!--% 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 %--> <!--% MACRO absolute_path(baseurl) BLOCK %-->
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->