1 Commits

Author SHA1 Message Date
Paul Jewell
70f994e7e8 Hide error output from which command
Local version is used if a global system version isn't found. Without
this redirect, the error response from which is shown on the terminal,
even though everything is OK.
2025-01-28 18:25:59 +00:00
50 changed files with 447 additions and 131 deletions

View File

@@ -95,11 +95,11 @@ program which creates the hpr.db file:
`./utils/mysql2sqlite ./hpr-sqlite.sql | sqlite3 ./hpr.db`
For convenience, the update-hpr-db.sh script in the utils directory
For convenience, the update-sqlite-db.sh script in the utils directory
automates the above steps (including downloading the hpr.sql file).
From the root of the local hpr_generator repository run:
`./utils/update-hpr-db.sh`
`./utils/update-sqlite-db.sh`
# Configure the site-generator
@@ -111,7 +111,7 @@ file are found in the comments within the file.
Any database supported by the Perl:DBI and Perl::DBD modules can be used with
the site-generator program. Currently the hpr_generator project works with
an SQLite database.
a MySQL or SQLite database.
Find the [DBI] section of the file. It should look like the following
@@ -146,6 +146,26 @@ The hpr.db section of the driver option `dbi:SQLite:hpr.db` is the path
to the sqlite file. The default assumes the hpr.db file is located in the same
directory as the site-generator.
### MySQL
Remove the comment character from the start of the database, driver,
user, and password option lines:
```
# Configuration settings for MySQL
database: mysql
driver: dbi:mysql:database=hpr_hpr:hostname=localhost
user: hpr-generator
password: *********
```
This assumes that the MySQL database service is available at the localhost
hostname, that the database name (hpr_hpr) is the database created from
the hpr.sql dump file or manually created by you, that the user (hpr-generator)
was added by you and has read rights to the hpr_hpr database, and that the
password (replace ********* with the actual password) matches the password set
for the hpr-generator database user.
## Configuring the website for viewing locally
For HTML links to work when viewing the files on your local machine using the

View File

@@ -15,6 +15,15 @@ Static web page generator for the Hacker Public Radio website.
2. Run `./utils/update-hpr.sh`
* SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries. Must convert WITH
clauses to sub-queries when using earlier versions of SQLite.
* With MySQL
* Create database hpr_hpr in the MySQL server from HPR dump file.
- ``sudo mysql --host=localhost < hpr.sql``
* Create a user that will be used by the site-generator.
- Suggested username: hpr-generator
- ``CREATE USER 'hpr-generator'@'localhost' IDENTIFIED BY '<password>';``
* Limit the user's privileges to EXECUTE and SELECT
- ``GRANT SELECT ON hpr_hpr.* TO 'hpr-generator'@'localhost';``
- ``GRANT EXECUTE ON `hpr_hpr`.* TO 'hpr-generator'@'localhost';``
* Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
* Getopt::Long
* Pod::Usage
@@ -26,7 +35,7 @@ Static web page generator for the Hacker Public Radio website.
* Template::Plugin::HTML::Strip
* DBI
* Tie::DBI
* DBD::SQLite
* DBD::SQLite or DBD::mysql
* Date::Calc
* Text::CSV_XS
* HTML::Entities
@@ -67,6 +76,4 @@ and add the label "**Feature Request**".
* gordons
* Ken Fallon
* norrist
* Paul Jewell

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -56,9 +56,19 @@ Perl Template Toolkit.
* SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries.
Must convert WITH clauses to sub-queries when using earlier versions of SQLite.
With MySQL
* Create database hpr_hpr in the MySQL server from HPR dump file.
- sudo mysql --host=localhost < hpr.sql
* Create a user that will be used by the site-generator.
- Suggested username: hpr-generator
- CREATE USER 'hpr-generator'@'localhost' IDENTIFIED BY '<password>';
* Limit the user's privileges to EXECUTE and SELECT
- GRANT SELECT ON hpr_hpr.* TO 'hpr-generator'@'localhost';
- GRANT EXECUTE ON `hpr_hpr`.* TO 'hpr-generator'@'localhost';
Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
* Config::Std
* DBD::SQLite
* DBD::SQLite or DBD:mysql
* DBI
* Data::Dumper
* Date::Calc

View File

@@ -7,6 +7,13 @@
# Configuration settings for SQLite
database: sqlite
driver: dbi:SQLite:hpr.db
#user: (not used - leave blank)
#password: (not used - leave blank)
# Configuration settings for MySQL
#database: mysql
#driver: dbi:mysql:database=hpr_hpr:hostname=localhost
#user: hpr-generator (Suggested user with read-only privileges)
#password: ********* (Password for user)
# Configure the location of the templates and the generated HTML
[app_paths]
@@ -26,10 +33,6 @@ media_baseurl: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr$eps_
generator_name: The HPR Robot
generator_email: robot.nospam@nospam.hackerpublicradio.org
# Is safe for work: 0 for true, 1 for false -- if true substitute
# variations of Hobby for Hacker
is_sfw: 1
# Configure the navigation menu and the content templates for each page
# of the site:
#

View File

@@ -23,7 +23,7 @@
<p>What differentiates HPR from other podcasts is that the shows are crowd sourced from the community -
fellow listeners like <strong><a href="<!--% absolute_url(baseurl,'about.html#contact') %-->">you</a></strong>.
There is no restriction on how long the show can be, nor on the topic you can cover as long as they are not spam
and <em>&quot;are of interest to <a href="http://en.wikipedia.org/wiki/Hacker_(hobbyist)" ><!--% make_sfw(is_sfw, "Hobbyists", "Hackers") %--></a>&quot;</em>.
and <em>&quot;are of interest to <a href="http://en.wikipedia.org/wiki/Hacker_(hobbyist)" >Hackers</a>&quot;</em>.
If you want to see what topics have been covered so far just have a look at our
<a href="<!--% absolute_url(baseurl,'eps/index.html') %-->">Archive</a>.
We also allow for a <a href="<!--% absolute_url(baseurl,'series/index.html') %-->">series</a> of shows so that
@@ -37,7 +37,7 @@
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</a>.</p>
<h2 id="history">History<a href="<!--% absolute_url(baseurl,'about.html#history') %-->">.</a></h2>
<p><!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio (HPR) is an Internet Radio show (podcast) that releases shows every weekday Monday through Friday.
<p>Hacker Public Radio (HPR) is an Internet Radio show (podcast) that releases shows every weekday Monday through Friday.
HPR has a long lineage going back to <a href="https://web.archive.org/web/20230323053905/http://www.oldskoolphreak.com/" >Radio FreeK America</a>,
<a href="https://web.archive.org/web/20220123174618/https://www.binrev.com/forums/" >Binary Revolution Radio</a> &amp; <a href="https://web.archive.org/web/20150208172826/http://www.nomicon.info/" >Infonomicon</a>,
and it is a rename of <a href="<!--% absolute_url(baseurl,'twat.html') %-->" >Today With a Techie</a> radio.
@@ -45,7 +45,7 @@
Introduction to HPR</a>&quot; for more information.</p>
<h2 id="free_culture">Free Culture<a href="<!--% absolute_url(baseurl,'about.html#free_culture') %-->">.</a></h2>
<p><!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio is dedicated to sharing knowledge. We do not accept donations so please consider supporting our patrons.
<p>Hacker Public Radio is dedicated to sharing knowledge. We do not accept donations so please consider supporting our patrons.
If you listen to HPR, then we would love you to <a href="contribute.html">contribute</a> one show a year.
Our shows are by default released under a <a href="https://creativecommons.org/licenses/by-sa/4.0/" >
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</a> license.
@@ -80,7 +80,7 @@
<p>
Our hosting is kindly provided by <a href="<!--% absolute_url(baseurl) %-->correspondents/0174.html">Josh</a> from
<a href="https://anhonesthost.com/shared-hosting/">AnHonestHost.com</a>.
We would appreciate it if you could <a href="https://secure.anhonesthost.com/store/hpr-hosting-cost-donations">donate</a> to help
We would appreciate it if you could <a href="https://secure.anhonesthost.com/cart.php?gid=17">donate</a> to help
reduce his costs in funding the hosting. He is also accepting bitcoins to <em>1KsxJr9HtsdaUeU7yaV9bk9bQi21UPBtUq</em>
</p>
<p>
@@ -93,7 +93,7 @@
<h1 id="contact">Primary Contact Points<a href="<!--% absolute_url(baseurl,'about.html#contact') %-->">.</a></h1>
<ul>
<li>email: <strong>admin -at- <!--% make_sfw(is_sfw, "hobby", "hacker") %-->publicradio org</strong>, will put you in touch with the Janitors who are
<li>email: <strong>admin -at- hackerpublicradio org</strong>, will put you in touch with the Janitors who are
the first point of contact for any issues related to the HPR community.
If you have any issue of concern please bring it to their attention first.
<br />
@@ -103,7 +103,7 @@
<li>Maillist: <a href="<!--% absolute_url(baseurl,'/maillist') %-->">Mailing list</a>.
While the Janitors are the first point of contact, the HPR project is
<a href="<!--% absolute_url(baseurl,'about.html#governance') %-->">governed</a> by the community.
Decisions about how <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio are made on the mailing list, and you can join it by going to :<br />
Decisions about how Hacker Public Radio are made on the mailing list, and you can join it by going to :<br />
<a href="<!--% absolute_url(baseurl,'/maillist') %-->"><!--% absolute_url(baseurl,'/maillist') %--></a></li>
<li>Mastodon: <a href="https://infosec.exchange/@hpr">https://infosec.exchange/@hpr</a> is the official HPR Mastodon instance
and is actively monitored.</li>
@@ -142,7 +142,7 @@
<h1 id="how_to_help">How to Help<a href="<!--% absolute_url(baseurl,'about.html#how_to_help') %-->">.</a></h1>
<p>
<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio is a communty podcast where the shows are provided by the community, and is also
Hacker Public Radio is a communty podcast where the shows are provided by the community, and is also
<a href="<!--% absolute_url(baseurl,'about.html#governance') %-->">governed</a> by the community,
and we rely on the <a href="<!--% absolute_url(baseurl,'about.html#patrons') %-->">support our Patrons</a>
to provide the hosting infrastructure.
@@ -158,7 +158,7 @@
<h2 id="podcatcher_support">Podcatcher Support</h2>
<p>
Please report your experiences with our feeds to admin@hpr</a>.
Please report your experiences with our feeds to <!--% absolute_url(baseurl,'about.html#contact') %-->admin@hpr</a>.
</p>
<h2 id="other_ways_to_help">Other ways to help</h2>
@@ -240,7 +240,7 @@
<a href="<!--% absolute_url(baseurl) %-->series/index.html">Series</a> page to see if you can add your knowledge to the pool.
</p>
<p>
If you are worried that your show may not be of interest to <!--% make_sfw(is_sfw, "Hobbyists", "Hackers") %--> then you can <a href="<!--% absolute_url(baseurl) %-->will-my-show-be-of-interest-to-hackers.html">click here</a> to check if it is.
If you are worried that your show may not be of interest to Hackers then you can <a href="<!--% absolute_url(baseurl) %-->will-my-show-be-of-interest-to-hackers.html">click here</a> to check if it is.
</p>
<p>
If you can't think of anything to talk about then please just record a show telling us
@@ -314,7 +314,7 @@
<h2 id="motto">Our Mottos</h2>
<blockquote>Any audio is better than no audio.</blockquote>
<blockquote>Any topic of intrest to <!--% make_sfw(is_sfw, "hobbyists", "hackers") %-->.</blockquote>
<blockquote>Any topic of intrest to hackers.</blockquote>
<blockquote>It ain't a show unless it's on the server.</blockquote>
<blockquote>If you tell us you are doing a show, then you owe us a show.</blockquote>
@@ -422,7 +422,7 @@
<h2 id="no_shows_no_hpr">HPR will stop as a project if there are not enough shows
<a href="<!--% absolute_url(baseurl,'about.html#no_shows_no_hpr') %-->">.</a></h2>
<p>
<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio is dedicated to sharing knowledge.
Hacker Public Radio is dedicated to sharing knowledge.
We release about 260 shows a year, which is probably more than all of the other FOSS podcasts put together.
If you listen to HPR, then we would love you to
<a target="_blank" href="<!--% absolute_url(baseurl,'about.html#so_you_want_to_record_a_podcast') %-->">contribute</a>
@@ -440,7 +440,7 @@
</p>
<h2 id="syndication">We do not syndicate non HPR Shows<a href="<!--% absolute_url(baseurl,'about.html#syndication') %-->">.</a></h2>
<p>
HPR is founded on the principle of <!--% make_sfw(is_sfw, "Hobbyists", "Hackers") %--> sharing knowledge.
HPR is founded on the principle of Hackers sharing knowledge.
For this reason we are only releasing material created exclusively for HPR.
We will continue to promote new podcasts and other creative commons material,
but if you wish to have your show promoted,
@@ -628,7 +628,7 @@
Whichever option you have close to hand, try and set the recording to the best quality format
(<a href="https://en.wikipedia.org/wiki/WAV">WAV</a> or <a href="https://en.wikipedia.org/wiki/FLAC">FLAC</a>),
and set everything else to the highest setting.
It's always the goal to get the best quality audio but here at <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio we value content over quality
It's always the goal to get the best quality audio but here at Hacker Public Radio we value content over quality
and so long as it's audible we'll take it.
</p>
<p>
@@ -690,7 +690,7 @@
<p>
If you would like to record with multiple participants then you can use <a href="https://www.mumble.com/">Mumble</a>.
Connect to <strong>chatter.skyehaven.net</strong> Port: <strong>64738 </strong>.<br />
Walk through the audio wizard and then pop into the <strong><!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio</strong> room.
Walk through the audio wizard and then pop into the <strong>Hacker Public Radio</strong> room.
Once you are ready press the <strong>recording</strong> button, select <em>multichannel</em> and then <em>start</em>.
That will record multiple tracks, one for each participant which you can edit and then submit.
<br />
@@ -715,7 +715,7 @@
<h2 id="encoding">We mix down to Mono<a href="<!--% absolute_url(baseurl,'about.html#encoding') %-->">.</a></h2>
<p>
We will by default mix down your show to one channel mono and we will
<a href="https://gitorious.org/hpr-scheduling-system/hpr-scheduling-system/source/2d526e000d31e79afa3d863ea8659503e2074267:transcoding/hprtranscode">transcode</a> to MP3, ogg and spx formats. If you want to control this in more detail then please email admin at <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio for more information.
<a href="https://gitorious.org/hpr-scheduling-system/hpr-scheduling-system/source/2d526e000d31e79afa3d863ea8659503e2074267:transcoding/hprtranscode">transcode</a> to MP3, ogg and spx formats. If you want to control this in more detail then please email admin at Hacker Public Radio for more information.
</p>
<h2 id="no_metadata">No need to add Metadata to the file<a href="<!--% absolute_url(baseurl,'about.html#no_metadata') %-->">.</a></h2>
@@ -872,17 +872,42 @@
Your audio is completely inaccessible to those who have hearing problems,
so the only way for your show to be of help to them is if you distill the essence of the show into the show notes.
If you are using a script to prepare your show then include that.</li>
<li><strong>Adding the shownotes</strong>
<ul>
<li>Add text and use the WYSIWYG editor buttons to add additional formatting</li>
<li>Optionally - You can paste in <strong>Rendered</strong> HTML</li>
<li><strong>Do not paste un-rendored markup (HTML, Markdown,
RestructuredText)</strong> unless your intention is to have un-rendored
markup as shownotes.</li>
<li>The amount you can enter is restricted to 4000 characters, but you can provide additional show notes if you wish.
Please add them to an full_shownotes.html file which you can expect to be served from
<!--% absolute_url(baseurl) %-->eps/hpr9999/full_shownotes.html</li>
</ul>
The amount you can enter is restricted to 4000 characters, but you can provide additional show notes if you wish.
Please add them to an full_shownotes.html file which you can expect to be served from
<!--% absolute_url(baseurl) %-->eps/hpr9999/full_shownotes.html<br /> <br />
<li>
If you wish to include text formatting then please use a format that supports it. We accept:
<ul>
<li>HTML5</li>
<li>Markdown (standard)</li>
<li>Markdown (GitHub flavoured)</li>
<li>Markdown (Pandoc flavoured)</li>
<li>RestructuredText</li>
<li>txt2tags</li>
<li>Plain text</li>
</ul>
However please restrict yourself to text unless you are experienced producing valid markdown/HTML5.
Regardless of the format you send your shownotes will end up in html5 &lt;article&gt; section,
where the header and footer are not available to you. Avoid using &lt;div&gt; or &lt;span&gt;.
The inclusion of JavaScript will send your show into quarantine, until an experienced HPR volunteer
can be found to debug it.<br />
It takes us a lot longer to fix incorrectly formatted shownotes than plain text, so please only create formatted
show notes if you know what you are doing and are sure that what you are writing is valid.
</li>
<li id="shownotes_format"><strong>Show Note Format:</strong> <em>Optional</em><br />
Please tell us which format, if any you used when filling in your shownotes.
<ul>
<li><a href="https://www.w3schools.com/html/default.asp">HTML5</a></li>
<li><a href="https://en.wikipedia.org/wiki/Markdown">Markdown (standard)</a></li>
<li><a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax">Markdown (GitHub flavoured)</a></li>
<li><a href="https://pandoc.org/MANUAL.html#pandocs-markdown">Markdown (Pandoc flavoured)</a></li>
<li><a href="https://docutils.sourceforge.io/docs/user/rst/quickstart.html">RestructuredText</a></li>
<li>Plain text having no formatting.</li>
</ul>
</li>
<li id="series"><strong>Series:</strong> <em>Optional</em><br />
Select the <a href="<!--% absolute_url(baseurl) %-->series/index.html">series</a> if any that your show is a part of.
@@ -948,13 +973,13 @@
<hr />
<h1 id="faq">Frequently Asked Questions</h1>
<h2 data-number="0.1" id="what-is-hacker-public-radio"><span class="header-section-number">0.1</span> What is <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio?</h2>
<h2 data-number="0.1" id="what-is-hacker-public-radio"><span class="header-section-number">0.1</span> What is Hacker Public Radio?</h2>
<ul>
<li><p>Hacker<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio (HPR) is an Internet Radio show (podcast) that releases shows (episodes)
<li><p>Hacker Public Radio (HPR) is an Internet Radio show (podcast) that releases shows (episodes)
every weekday Monday through Friday.</p></li>
<li><p>What differentiates HPR from other podcasts is that the shows are crowd sourced from the community
- fellow listeners like you. There is no restriction on how long shows can be, nor on the topic you can cover,
as long as they are not spam and "are of interest to <!--% make_sfw(is_sfw, "Hobbyists", "Hackers") %-->".</p>
as long as they are not spam and "are of interest to Hackers".</p>
<p>If you want to see what topics have been covered so far just have a look at our
<a href="<!--% absolute_url(baseurl) %-->eps/index.html">Archive</a>. We also allow for shows to be grouped
into <a href="<!--% absolute_url(baseurl) %-->series/index.html">series</a> so that hosts can go into more detail on a topic.</p></li>
@@ -1007,7 +1032,7 @@
which can be used for such shows.</p></li>
</ul>
<h2 data-number="0.4" id="what-defines-a-show-as-being-produced-for-hacker-public-radio"><span class="header-section-number">0.4</span>
What defines a show as being "<em>Produced for <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio</em>"?</h2>
What defines a show as being "<em>Produced for Hacker Public Radio</em>"?</h2>
<ul>
<li>If you create material and post it first on HPR then it meets the requirements of "<em>being produced for HPR</em>".
That means once you upload it to the HPR server you can publish it anywhere else you like.</li>
@@ -1145,11 +1170,11 @@
</ul>
<h2 data-number="0.14" id="faq_wikipedia"><span class="header-section-number">0.14</span> Why has HPR not got a Wikipedia page?</h2>
<p>
Once someone contributes to <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio, the Wikipedia rules prevent us from editing a page.
Once someone contributes to Hacker Public Radio, the Wikipedia rules prevent us from editing a page.
You can of course create one prior to contributing a show, or ask for one to be created.
</p>
<p>
We do of course believe that <!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio should have a Wikipedia entry.
We do of course believe that Hacker Public Radio should have a Wikipedia entry.
We are one of the longest running podcasts having started as Today with a Techie on 2005-09-19.
We also are unique in our community driven approach to producing shows.
And of course the fact that Wikipedia itself references us as a source

View File

@@ -1,9 +1,8 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS "queries-episode.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<h2>Comment Viewer</h2>
<p>Because of the spammers we have had to turn on comment moderation. Sorry about the delay this will cause.</p>
<p><a href="<!--% absolute_path(baseurl) %-->comments.rss">Subscribe</a> to the comment feed.</p>

View File

@@ -1,8 +1,8 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-correspondent.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% PROCESS "queries-correspondent-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
%-->
<!--% results_hpr_show_count = DBI.prepare(query_hpr_show_count) %-->

View File

@@ -3,7 +3,7 @@
<article>
<h2 class="title">Correspondents</h2>
<p>For more information on how to become a Correspondent see our <a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">contribute</a></center> page. To add a logo here, either email one to admin at hpr or setup your email on <a href="https://en.gravatar.com/">Gravatar</a>. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.<p />
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% host_cnt = 0 %-->
<table class="hosts">
<th >Avatar</th>

View File

@@ -3,7 +3,7 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS "queries-episode.tpl.html" %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare(query_episode_maxmin) %-->
<!--% episode_result = query_episodes.execute(id, id, id, id, id) %-->

View File

@@ -1,5 +1,5 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS "queries-episodes.tpl.html" %-->
<!--% PROCESS "queries-episodes-${constants.database}.tpl.html" %-->
<article>
<header>
<h1>Complete Archive of Shows.</h1>
@@ -7,7 +7,7 @@
All this information is available to the public. Scrape if you wish but if we can format the data for you then we're happy to help.
</p>
</header>
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episodes IN DBI.query(query_episodes)
%-->
<!--% show_summary(episodes) %-->

View File

@@ -4,7 +4,7 @@
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS 'shared-call_for_shows.tpl.html' %-->
<!--% INCLUDE 'content-index-announcement.tpl.html' %-->
<!--% PROCESS "queries-index.tpl.html" %-->
<!--% PROCESS "queries-index-${constants.database}.tpl.html" %-->
<!--% MACRO tidy_notes(all_lines) BLOCK %-->
<!--% lines = all_lines %-->
<!--% after_html = all_lines %-->
@@ -29,7 +29,7 @@
<h3>Welcome to HPR, the Community Podcast</h3>
</header>
<!--% days_till_next_episode = 0 %-->
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% USE date %-->
<!--% calc = date.calc %-->
<!--% episodes = DBI.query(query_next_available_episode).get_all() %-->
@@ -40,7 +40,7 @@
<!--% days_till_next_episode = calc.Delta_Days(now.0,now.1,now.2,slot_date.0,slot_date.1,slot_date.2) %-->
<!--% 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#twt_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">topics</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)"><!--% make_sfw(is_sfw, "hobbyists", "hackers") %--></a>"</strong>. If you listen to HPR then please consider contributing one show a year. If you <a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">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#twt_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">topics</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_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">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() %-->
<hr>
@@ -62,7 +62,7 @@
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
</p>
</header>
<p>See <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(latest_episodes.id) %-->/index.html">episode show notes</a> for more information.</p>
<!--% tidy_notes(latest_episodes.notes) %-->
</article>
<!--% host_cnt = host_cnt + 1 %-->
<!--% END %-->

View File

@@ -1,7 +1,7 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-series.tpl.html" %-->
<!--% PROCESS "queries-series-${constants.database}.tpl.html" %-->
<article>
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<h1 class="title">In-Depth Series</h1>
<!--% FOREACH series IN DBI.query(query_episodes) %-->
<h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>

View File

@@ -1,7 +1,7 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS "queries-series_episodes.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% PROCESS "queries-series_episodes-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_series = DBI.prepare(query_series_sql)
%-->
<!--% series_result = query_series.execute(id) %-->

View File

@@ -1,6 +1,6 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-tags.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% PROCESS "queries-tags-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% PERL %-->
$Template::Stash::PRIVATE = undef; # Allow . in tag
<!--% END %-->

View File

@@ -2,7 +2,7 @@
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% USE DBI(constants.driver) %-->
<!--% 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\'

View File

@@ -1,4 +1,4 @@
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH host IN DBI.query(
'select h.hostid from hosts as h'
) %-->

View File

@@ -1,5 +1,5 @@
<!--% PROCESS "queries-ids-episode.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% PROCESS "queries-ids-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episode IN DBI.query(query_ids_episode) %-->
,<!--% episode.id %-->
<!--% END %-->

View File

@@ -1,4 +1,4 @@
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episode IN DBI.query(
'select eps.id from twat_eps AS eps'
) %-->

View File

@@ -3,7 +3,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<title><!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio ~ The Technology Community Podcast</title>
<title>Hacker Public Radio ~ The Technology Community Podcast</title>
<!--% IF baseurl %-->
<base href="<!--% baseurl %-->">
<!--% END %-->
@@ -11,7 +11,7 @@
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
<meta http-equiv="last-modified" content="<!--% format_feed_date(date.now) %-->">
<meta name="keywords" content="Technology, Tech News, Education, Training" />
<meta name="description" content="<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio is a podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that is of interest to <!--% make_sfw(is_sfw, "makers", "hackers") %--> and hobbyists." />
<meta name="description" content="Hacker Public Radio is a podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that is of interest to hackers and hobbyists." />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Internal CSS -->
<style type="text/css">
@@ -23,10 +23,10 @@
}
</style>
<link rel="shortcut icon" href="<!--% absolute_url(baseurl) %-->hpr.ico" >
<link rel="alternate" type="application/rss+xml" title="<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio Opus RSS" href="<!--% absolute_path(baseurl) %-->hpr_opus_rss.php" />
<link rel="alternate" type="application/rss+xml" title="<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio Ogg Vorbis RSS" href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php" />
<link rel="alternate" type="application/rss+xml" title="<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio MP3 RSS" href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php" />
<link rel="alternate" type="application/rss+xml" title="<!--% make_sfw(is_sfw, "Hobby", "Hacker") %--> Public Radio Comments RSS" href="<!--% absolute_path(baseurl) %-->comments.rss" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Opus RSS" href="<!--% absolute_path(baseurl) %-->hpr_opus_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 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-SA 4.0" href="https://creativecommons.org/licenses/by-sa/4.0/" />
<link href="/css/hpr.css" rel="stylesheet" />
<!--[if IE]>
@@ -46,7 +46,7 @@
- <a href="#maincontent">skip to main content</a>
</p>
<h1 id="sitename">
<a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">H</a><!--% make_sfw(is_sfw, "obby", "acker") %-->
<a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">H</a>acker
<a href="<!--% absolute_path(baseurl) %-->comments_viewer.html">P</a>ublic
<a href="<!--% absolute_path(baseurl) %-->syndication.html">R</a>adio
</h1>
@@ -81,7 +81,7 @@
<nav class="column">
<h2>Social</h2>
<ul>
<li><a href="https://lists.hackerpublicradio.com/mailman/listinfo/hpr" >Mailing list</a></li>
<li><a href="<!--% absolute_url(baseurl,'/maillist') %-->" >Mailing list</a></li>
<li><a rel="me" href="https://infosec.exchange/@hpr" >Mastodon</a></li>
<li><a href="https://matrix.to/#/#hpr:matrix.org" >Matrix</a></li>
<li><a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0" >Mumble</a></li>

View File

@@ -0,0 +1,6 @@
<!--% query_call_for_shows = '
SELECT CASE WHEN COUNT(id) < 6 THEN True ELSE False END AS `request_for_shows`
FROM eps
WHERE eps.date > NOW() AND eps.date <= DATE_ADD(NOW(), INTERVAL 10 DAY)
'
%-->

View File

@@ -0,0 +1,24 @@
<!--% query_hpr_shows = '
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, hosts.profile,
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
'
%-->
<!--% query_hpr_show_count = '
SELECT id
FROM eps
WHERE eps.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
'
%-->

View File

@@ -0,0 +1,51 @@
<!--% query_episode_maxmin = '
WITH episode_maxmin AS (
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
FROM eps
WHERE eps.date <= UTC_DATE()
),
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 = ?
'
%-->

View File

@@ -0,0 +1,15 @@
<!--% 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 <= UTC_DATE()
ORDER BY eps.id DESC'
%-->

View File

@@ -0,0 +1,2 @@
<!--% query_ids_episode = 'select eps.id from eps order by eps.id' %-->

View File

@@ -0,0 +1,58 @@
<!--% query_next_available_episode = '
SELECT id, date FROM eps e WHERE id = (
SELECT id + 1 FROM eps mo
WHERE NOT EXISTS (
SELECT NULL
FROM eps mi
WHERE mi.id = mo.id + 1
)
ORDER BY id
LIMIT 1) - 1
'
%-->
<!--% 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 <= UTC_DATE()
ORDER BY eps.id DESC
LIMIT 10
'
%-->
<!--% query_last_5_weeks_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 <= UTC_DATE()
ORDER BY eps.id DESC
LIMIT 30 OFFSET 10
'
%-->

View File

@@ -0,0 +1,15 @@
<!--% query_episodes = 'SELECT miniseries.id, miniseries.name, miniseries.description,
miniseries.private, miniseries.image, miniseries.valid,
ep.number_of_episodes, ep.latest_show, ep.earliest_show
FROM miniseries
INNER JOIN
(SELECT series,
COUNT(eps.id) AS number_of_episodes,
MAX(eps.date) AS latest_show,
MIN(eps.date) AS earliest_show
FROM eps
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
GROUP BY series) AS ep ON ep.series = miniseries.id
ORDER BY name'
%-->

View File

@@ -0,0 +1,29 @@
<!--% query_series_sql = 'SELECT miniseries.id, miniseries.name,
miniseries.description,
miniseries.private, miniseries.image, miniseries.valid,
ep.number_of_episodes, ep.latest_show, ep.earliest_show
FROM miniseries
INNER JOIN
(SELECT series,
COUNT(eps.id) AS number_of_episodes,
MAX(eps.date) AS latest_show,
MIN(eps.date) AS earliest_show
FROM eps
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
GROUP BY series) AS ep ON ep.series = miniseries.id
WHERE miniseries.id = ?
ORDER BY name'
%-->
<!--% query_shows_sql = 'SELECT
id, date, title,
duration, summary, notes,
explicit, eps.license, tags,
hosts.host, hosts.hostid
FROM eps
INNER JOIN hosts
ON eps.hostid = hosts.hostid
WHERE series = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC
'
%-->

View File

@@ -0,0 +1 @@
<!--% query_tags = 'SELECT id, tags FROM eps' %-->

View File

@@ -3,10 +3,9 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% USE date %-->
<!--% USE HTML.Strip emit_spaces = 0 %-->
<channel>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% absolute_url(http_baseurl) %-->about.html</link>
<link><!--% baseurl %-->about.html</link>
<description>Comments Feed: Hacker Public Radio is a podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that is 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>
@@ -16,15 +15,15 @@
<docs>https://www.rssboard.org/rss-specification</docs>
<ttl>600</ttl>
<image>
<url><!--% absolute_url(http_baseurl) %-->images/hpr_feed_small.png</url>
<url><!--% baseurl %-->images/hpr_feed_small.png</url>
<title>Hacker Public Radio ~ Comment Feed</title>
<link><!--% absolute_url(http_baseurl) %-->about.html</link>
<link><!--% baseurl %-->about.html</link>
<description>The Hacker Public Radio Old Microphone Logo</description>
<height>164</height>
<width>144</width>
</image>
<atom:link href="<!--% absolute_url(http_baseurl) %-->comments.rss" rel="self" type="application/rss+xml" />
<!--% USE DBI(constants.driver) %-->
<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>
@@ -50,15 +49,15 @@
%-->
<item>
<title><!--% item.comment_author_name | html_strip | xml_entity %--> says: <!--% item.comment_title | html_strip | xml_entity %--></title>
<author>feedback.nospam@nospam.hackerpublicradio.org (<!--% item.comment_author_name | html_strip | xml_entity %-->)</author>
<link><!--% absolute_url(http_baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comments</link>
<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 | html_strip | xml_entity %--></em> by <a href="<!--% absolute_url(http_baseurl) %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a></strong><!--% rss_show_series(item.series_name, item.series_id) | html_strip | xml_entity %--><br />
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"><!--% absolute_url(http_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>
<!--% END %-->
</channel>

View File

@@ -1,5 +1,5 @@
<!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS "rss-query-hpr.tpl.xml" %-->
<!--% PROCESS "rss-query-hpr-${constants.database}.tpl.xml" %-->
<!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
<!--% END %-->

View File

@@ -1,5 +1,5 @@
<!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS "rss-query-hpr_total.tpl.xml" %-->
<!--% PROCESS "rss-query-hpr_total-${constants.database}.tpl.xml" %-->
<!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
<!--% END %-->

View File

@@ -0,0 +1,26 @@
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_feed = DBI.prepare('
SELECT
eps.id,
eps.explicit,
DATE_FORMAT(eps.date, \'%H:%i:%S %d:%m:%Y\') AS \'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,
assets.size AS length
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN assets ON eps.id = assets.episode_id
WHERE eps.date <= UTC_DATE()
AND assets.extension = ?
ORDER BY eps.date DESC
LIMIT 10
')
%-->
<!--% feed_result = query_hpr_feed.execute(media_file_extension) %-->

View File

@@ -1,4 +1,4 @@
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_feed = DBI.prepare('
SELECT
eps.id,

View File

@@ -0,0 +1,25 @@
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_feed = DBI.prepare('
SELECT
eps.id,
eps.explicit,
DATE_FORMAT(eps.date, \'%H:%i:%S %d:%m:%Y\') AS \'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,
assets.size AS length
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN assets ON eps.id = assets.episode_id
WHERE eps.date < UTC_DATE()
AND assets.extension = ?
ORDER BY eps.date DESC
')
%-->
<!--% feed_result = query_hpr_feed.execute(media_file_extension) %-->

View File

@@ -1,4 +1,4 @@
<!--% USE DBI(constants.driver) %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_feed = DBI.prepare('
SELECT
eps.id,

View File

@@ -1,5 +1,5 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-call_for_shows.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() %-->

View File

@@ -130,8 +130,3 @@
<!--% END %-->
<a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small>
<!--% END %-->
<!--% MACRO make_sfw(swf, sfw_text, nsfw_text) BLOCK %-->
<!--% IF swf == 0 %--><!--% sfw_text %-->
<!--% ELSE %--><!--% nsfw_text %-->
<!--% END %--><!--% END %-->

View File

@@ -18,7 +18,7 @@
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
set -o nounset # Treat unset variables as an error
#--- FUNCTION ----------------------------------------------------------------
# NAME: is_module_installed
@@ -27,41 +27,47 @@ set -o nounset # Treat unset variables as an error
# RETURNS: 0 if not found, 1 if found
#-------------------------------------------------------------------------------
function is_module_installed {
HR="----------------------"
perl -e "use ${1} "
if [ $? -ne 0 ]; then
echo ${HR}
else
echo "Found module ${1}"
echo ${HR}
fi
HR="----------------------"
perl -e "use ${1} "
if [ $? -ne 0 ]
then
echo ${HR}
else
echo "Found module ${1}"
echo ${HR}
fi
}
MODULES=(
"Getopt::Long"
"Pod::Usage"
"Config::Std"
"Template"
"Template::Plugin::File"
"Template::Plugin::DBI"
"Template::Plugin::HTML::Strip"
"DBI"
"Tie::DBI"
"DBD::SQLite"
"Date::Calc"
"Text::CSV_XS"
MODULES=( \
"Getopt::Long" \
"Pod::Usage" \
"Config::Std" \
"Template" \
"Template::Plugin::File" \
"Template::Plugin::DBI" \
"Template::Plugin::HTML::Strip" \
"DBI" \
"Tie::DBI" \
"DBD::SQLite" \
"DBD::mysql" \
"Date::Calc" \
"Text::CSV_XS" \
)
echo "The following modules must be installed for the site-generator to function: "
for module in "${MODULES[@]}"; do
echo "* ${module}"
for module in "${MODULES[@]}"
do
echo "* ${module}"
done
echo "When MySQL is used, the DBD:mysql module is required (otherwise it is optional)"
echo "When SQLite is used, then the DBD:SQLite module is required (otherwise it is optional)"
echo "Scanning for modules ..."
echo "----------------------"
for module in "${MODULES[@]}"; do
is_module_installed "${module}"
for module in "${MODULES[@]}"
do
is_module_installed "${module}"
done
echo "Finished scanning."

View File

@@ -132,7 +132,7 @@ function make_hpr_sqlite_db {
return 1
fi
local MYSQL2SQLITE=`which mysql2sqlite`
local MYSQL2SQLITE=`which mysql2sqlite 2>/dev/null`
local BIN_PATH=""
if [ "$MYSQL2SQLITE" = "" ];