Compare commits
82 Commits
47a7493ef2
...
I164_check
Author | SHA1 | Date | |
---|---|---|---|
0f57b99fbe
|
|||
48b3c51bb3
|
|||
4e9f1457d5
|
|||
4ae854f5e1
|
|||
af810c88bc
|
|||
|
92dce90753 | ||
|
65e4e1af5e | ||
|
b5384408db | ||
|
1a84becd8d | ||
|
d74c23bace | ||
|
f1817e6820 | ||
|
493bae282b | ||
|
dbc557d4c5 | ||
|
2099f0e130 | ||
|
29c9c827a4 | ||
|
c72c813b02 | ||
|
966a94647d | ||
e090bf8498 | |||
|
4d1d4c8c1d | ||
99aee89698 | |||
|
f6f2c01202 | ||
797039d182 | |||
|
93f22fb266 | ||
|
eb0b752841 | ||
4c19b56643 | |||
9766ec2c36 | |||
392f9ba9e5 | |||
41979786eb | |||
|
a61f2a5222 | ||
|
ccba560ee3 | ||
|
a2c69ec898 | ||
|
1382fe5e2a | ||
54ba2dc318 | |||
c2c2cb0cc2 | |||
|
5ec9fd21e9 | ||
|
d053ec253a | ||
|
db6c0bedaa | ||
0c000b17b9 | |||
1853af5521 | |||
f4530a3f48 | |||
|
5b2b2ce6d0 | ||
6d8bdaa7a9 | |||
2713664f86 | |||
eacd1e8425 | |||
|
138c1e2d2b | ||
|
b69cb913ea | ||
|
467a14a72a | ||
|
69dcb66d05 | ||
|
1e451e156d | ||
|
7c98273236 | ||
|
fcf624dc22 | ||
|
fc096c6fa6 | ||
|
d34064d787 | ||
|
4287028e25 | ||
|
67f28d43e3 | ||
|
dc36d9de86 | ||
|
96642bc69f | ||
|
f432954891 | ||
|
3f32a39301 | ||
|
7d8af97f7d | ||
130f603748 | |||
|
eba235c503 | ||
|
8bcf6bd0e8 | ||
|
15cd9018b0 | ||
|
e5b5aac104 | ||
|
0ef92840c8 | ||
|
79a788bda9 | ||
|
2e151ebae9 | ||
|
097b50b30b | ||
|
8325b2c0d1 | ||
|
a49bd6b08d | ||
|
c8135d811d | ||
|
dab80f1772 | ||
|
3ccd6101ee | ||
|
51d328203b | ||
|
366729a827 | ||
|
faac8c202e | ||
|
3cf2f3a8e1 | ||
|
83bb04f25c | ||
|
383ef45bb7 | ||
|
68c5e91552 | ||
|
35fa97e120 |
@@ -41,8 +41,9 @@ apt install libconfig-std-perl \
|
|||||||
## Using CPAN to install the modules
|
## Using CPAN to install the modules
|
||||||
|
|
||||||
A cross platform method to install the needed modules is the Perl CPAN application.
|
A cross platform method to install the needed modules is the Perl CPAN application.
|
||||||
Make sure both the [make](https://www.gnu.org/software/make/manual/make.html)
|
Make sure that the [gcc](https://www.gnu.org/software/gcc/),
|
||||||
command and the [cpan](https://perldoc.perl.org/CPAN) command are available.
|
[make](https://www.gnu.org/software/make/manual/make.html),
|
||||||
|
and [cpan](https://perldoc.perl.org/CPAN) commands are available.
|
||||||
Install them using the operating system's package manager, or from source.
|
Install them using the operating system's package manager, or from source.
|
||||||
|
|
||||||
Run commands:
|
Run commands:
|
||||||
@@ -51,9 +52,21 @@ Run commands:
|
|||||||
cpan Config::Std
|
cpan Config::Std
|
||||||
cpan Template
|
cpan Template
|
||||||
cpan Template::Plugin::DBI
|
cpan Template::Plugin::DBI
|
||||||
|
cpan Template::Plugin::HTML::Strip
|
||||||
cpan DBD::SQLite
|
cpan DBD::SQLite
|
||||||
cpan Date::Calc
|
cpan Date::Calc
|
||||||
cpan Tie::DBI
|
cpan Tie::DBI
|
||||||
|
cpan Text:CSV_XS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing for Perl module dependencies
|
||||||
|
|
||||||
|
A bash script is included in the utils directory that will list the Perl modules used by the site-generator and report whether the modules are installed on the current OS.
|
||||||
|
|
||||||
|
It can be run from any directory. To run from the utils directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
./check-dependencies.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
# Create the HPR database
|
# Create the HPR database
|
||||||
|
36
README.md
36
README.md
@@ -4,16 +4,16 @@ Static web page generator for the Hacker Public Radio website.
|
|||||||
## Installation
|
## Installation
|
||||||
* Clone or download this repository
|
* Clone or download this repository
|
||||||
* With SQLite
|
* With SQLite
|
||||||
* Create the sqlite3 database from the hpr.sql MySQL dump file available on
|
* Create the sqlite3 database from the hpr.sql MySQL dump file available on
|
||||||
hackerpublicradio.org. The default name for the database file is "hpr.db"
|
hackerpublicradio.org. The default name for the database file is "hpr.db"
|
||||||
and should be located in the root of the project directory. The name and
|
and should be located in the root of the project directory. The name and
|
||||||
location can be set in the site.cfg file.
|
location can be set in the site.cfg file.
|
||||||
* An "update-hpr.sh" helper script is available in the utils directory. This
|
* An "update-hpr.sh" helper script is available in the utils directory. This
|
||||||
script will download the hpr.sql file, convert it to the SQLite hpr.db file,
|
script will download the hpr.sql file, convert it to the SQLite hpr.db file,
|
||||||
and regenerate the website using the site-generator.
|
and regenerate the website using the site-generator.
|
||||||
1. `cd` into the root of the project directory
|
1. `cd` into the root of the project directory
|
||||||
2. Run `./utils/update-hpr.sh`
|
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
|
* 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.
|
clauses to sub-queries when using earlier versions of SQLite.
|
||||||
* With MySQL
|
* With MySQL
|
||||||
* Create database hpr_hpr in the MySQL server from HPR dump file.
|
* Create database hpr_hpr in the MySQL server from HPR dump file.
|
||||||
@@ -25,24 +25,30 @@ Static web page generator for the Hacker Public Radio website.
|
|||||||
- ``GRANT SELECT ON hpr_hpr.* TO 'hpr-generator'@'localhost';``
|
- ``GRANT SELECT ON hpr_hpr.* TO 'hpr-generator'@'localhost';``
|
||||||
- ``GRANT EXECUTE 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.)
|
* Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
|
||||||
* GetOpt
|
* Getopt::Long
|
||||||
* Pod::Usage
|
* Pod::Usage
|
||||||
* Config::Std
|
* Config::Std
|
||||||
* Template
|
* Template
|
||||||
* Template::Plugin::File
|
* Template::Plugin::File
|
||||||
* Template::Plugin::DBI
|
* Template::Plugin::DBI
|
||||||
|
* Template::Plugin::Date
|
||||||
|
* Template::Plugin::HTML::Strip
|
||||||
* DBI
|
* DBI
|
||||||
* Tie::DBI
|
* Tie::DBI
|
||||||
* DBD::SQLite or DBD:mysql
|
* DBD::SQLite or DBD::mysql
|
||||||
* Date::Calc
|
* Date::Calc
|
||||||
* See the Getting Started tutorial (GETTING_STARTED.md) for more details on
|
* Text::CSV_XS
|
||||||
|
* HTML::Entities
|
||||||
|
|
||||||
|
* See the [Getting Started](GETTING_STARTED.md) tutorial for more details on
|
||||||
installing the HPR generator.
|
installing the HPR generator.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Generate two specific pages:
|
Generate two specific pages:
|
||||||
`site-generator index about`
|
`site-generator index about`
|
||||||
|
|
||||||
Generate the whole site:
|
Generate the whole site:
|
||||||
`site-generator --all`
|
`site-generator --all`
|
||||||
|
|
||||||
Generate pages based on the same template:
|
Generate pages based on the same template:
|
||||||
`site-generator correspondent=1,3,5..10`
|
`site-generator correspondent=1,3,5..10`
|
||||||
@@ -65,7 +71,9 @@ To make a suggestion, please [submit an Issue](https://repo.anhonesthost.net/rho
|
|||||||
and add the label "**Feature Request**".
|
and add the label "**Feature Request**".
|
||||||
|
|
||||||
## Authors and acknowledgment
|
## Authors and acknowledgment
|
||||||
* Roan "Rho`n" Horning
|
* Roan "Rho`n" Horning
|
||||||
|
* Dave Morriss
|
||||||
* gordons
|
* gordons
|
||||||
* Ken Fallon
|
* Ken Fallon
|
||||||
* norrist
|
* norrist
|
||||||
|
|
||||||
|
BIN
public_html/images/hosts/149.png
Normal file
BIN
public_html/images/hosts/149.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
public_html/images/hosts/421.png
Normal file
BIN
public_html/images/hosts/421.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
public_html/images/hosts/425.png
Normal file
BIN
public_html/images/hosts/425.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
public_html/images/hosts/433.png
Normal file
BIN
public_html/images/hosts/433.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
@@ -67,18 +67,21 @@ Perl Template Toolkit.
|
|||||||
- GRANT EXECUTE 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.)
|
Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
|
||||||
* GetOpt
|
|
||||||
* Pod::Usage
|
|
||||||
* Config::Std
|
* Config::Std
|
||||||
* Template
|
|
||||||
* Template::Plugin::File
|
|
||||||
* Template::Plugin::DBI
|
|
||||||
* Template::Plugin::HTML::Strip
|
|
||||||
* DBI
|
|
||||||
* Tie::DBI
|
|
||||||
* DBD::SQLite or DBD:mysql
|
* DBD::SQLite or DBD:mysql
|
||||||
|
* DBI
|
||||||
|
* Data::Dumper
|
||||||
* Date::Calc
|
* Date::Calc
|
||||||
|
* GetOpt::Long
|
||||||
|
* HTML::Entities
|
||||||
|
* Pod::Usage
|
||||||
|
* Template
|
||||||
|
* Template::Plugin::DBI
|
||||||
|
* Template::Plugin::Date
|
||||||
|
* Template::Plugin::File
|
||||||
|
* Template::Plugin::HTML::Strip
|
||||||
* Text::CSV_XS
|
* Text::CSV_XS
|
||||||
|
* Tie::DBI
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
@@ -115,10 +118,10 @@ use Getopt::Long qw(:config auto_help);
|
|||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
use Config::Std;
|
use Config::Std;
|
||||||
use Text::CSV_XS;
|
use Text::CSV_XS;
|
||||||
use HTML::Entities qw(encode_entities_numeric);
|
#use HTML::Entities qw(encode_entities_numeric);
|
||||||
|
use HTML::Entities qw(encode_entities);
|
||||||
use Date::Calc;
|
use Date::Calc;
|
||||||
use DBI;
|
use DBI;
|
||||||
use DBD::SQLite;
|
|
||||||
use Tie::DBI;
|
use Tie::DBI;
|
||||||
use Template;
|
use Template;
|
||||||
use Template::Plugin::Date;
|
use Template::Plugin::Date;
|
||||||
@@ -232,7 +235,7 @@ sub main {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_template_html (\%@) {
|
sub get_template_html {
|
||||||
# For an HTML based Template file, define the
|
# For an HTML based Template file, define the
|
||||||
# template start and end tags to also function as
|
# template start and end tags to also function as
|
||||||
# HTML comments to make the template file valid HTML.
|
# HTML comments to make the template file valid HTML.
|
||||||
@@ -425,7 +428,8 @@ sub parse_csv {
|
|||||||
sub xml_entity {
|
sub xml_entity {
|
||||||
my ($text) = @_;
|
my ($text) = @_;
|
||||||
|
|
||||||
encode_entities_numeric( $text );
|
# encode_entities_numeric( $text );
|
||||||
|
encode_entities( $text );
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
1
site.cfg
1
site.cfg
@@ -29,6 +29,7 @@ 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/
|
||||||
baseurl: https://hackerpublicradio.org/
|
baseurl: https://hackerpublicradio.org/
|
||||||
|
http_baseurl: http://hackerpublicradio.org/
|
||||||
hub_baseurl: https://hub.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_name: The HPR Robot
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
<!--% query_hpr_show_count = DBI.prepare('
|
<!--% query_hpr_show_count = DBI.prepare('
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM eps
|
FROM eps
|
||||||
WHERE eps.hostid = ?
|
WHERE eps.hostid = ?
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
|
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
|
||||||
@@ -25,18 +25,18 @@
|
|||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% query_twat_shows = DBI.prepare('
|
<!--% query_twat_shows = DBI.prepare('
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
||||||
eps.date, eps.license, eps.duration,
|
eps.date, eps.license, eps.duration,
|
||||||
eps.title, eps.summary, eps.tags,
|
eps.title, eps.summary, eps.tags,
|
||||||
eps.notes,
|
eps.notes,
|
||||||
hosts.local_image,
|
hosts.local_image,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email,
|
hosts.host, hosts.email, hosts.profile,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid
|
miniseries.name AS series, miniseries.id AS seriesid
|
||||||
FROM twat_eps AS eps
|
FROM twat_eps AS eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE hosts.hostid = ?
|
WHERE hosts.hostid = ?
|
||||||
ORDER BY eps.id DESC
|
ORDER BY eps.id DESC
|
||||||
@@ -58,6 +58,7 @@
|
|||||||
<p><!--% get_avatar(this_host.hostid, this_host.host) %--><br>
|
<p><!--% get_avatar(this_host.hostid, this_host.host) %--><br>
|
||||||
<label>Host ID</label>: <!--% this_host.hostid %--><br><br>
|
<label>Host ID</label>: <!--% this_host.hostid %--><br><br>
|
||||||
<label>email:</label> <u><!--% this_host.email %--></u><br>
|
<label>email:</label> <u><!--% this_host.email %--></u><br>
|
||||||
|
<label>profile:</label> <!--% this_host.profile %--><br><br>
|
||||||
<label>episodes:</label> <strong><!--% hpr_show_count + twat_show_count %--></strong>
|
<label>episodes:</label> <strong><!--% hpr_show_count + twat_show_count %--></strong>
|
||||||
</p>
|
</p>
|
||||||
<!--% FOREACH hpr_show IN hpr_shows; %-->
|
<!--% FOREACH hpr_show IN hpr_shows; %-->
|
||||||
|
@@ -18,9 +18,10 @@
|
|||||||
</p>
|
</p>
|
||||||
<p><!--% show_avatar(episode.hostid, episode.host) %-->
|
<p><!--% show_avatar(episode.hostid, episode.host) %-->
|
||||||
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(episode.hostid) %-->.html"><!--% episode.host %--></a> on <span><!--% episode.date %--></span> is flagged as <span><!--% display_explicit(episode.explicit) %--></span> and is released under a <span><!--% episode.license %--> license</span>. <br>
|
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(episode.hostid) %-->.html"><!--% episode.host %--></a> on <span><!--% episode.date %--></span> is flagged as <span><!--% display_explicit(episode.explicit) %--></span> and is released under a <span><!--% episode.license %--> license</span>. <br>
|
||||||
<!--% display_tags(episode.tags) %-->
|
<!--% display_tags(episode.tags) %-->
|
||||||
|
|
||||||
<label>Comments: </label><!--% display_comments_tally(episode.id, episode.eps_tally) %--> <br>
|
<label>Comments: </label><!--% display_comments_tally(episode.id, episode.eps_tally) %--> <br>
|
||||||
|
The show is available on the Internet Archive at: <a href="https://archive.org/details/hpr<!--% zero_pad_left(episode.id) %-->">https://archive.org/details/hpr<!--% zero_pad_left(episode.id) %--></a>
|
||||||
<!--% listen_now(episode, "hpr", baseurl, media_baseurl) %-->
|
<!--% listen_now(episode, "hpr", baseurl, media_baseurl) %-->
|
||||||
</p>
|
</p>
|
||||||
<h3><!--% show_series(episode.series, episode.seriesid, "Part of the series") %--></h3>
|
<h3><!--% show_series(episode.series, episode.seriesid, "Part of the series") %--></h3>
|
||||||
@@ -53,7 +54,7 @@ Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss
|
|||||||
<!--% comment_index = 1 %-->
|
<!--% comment_index = 1 %-->
|
||||||
<!--% comments_result = query_comments.execute(id) %-->
|
<!--% comments_result = query_comments.execute(id) %-->
|
||||||
<!--% FOREACH comment IN comments_result %-->
|
<!--% FOREACH comment IN comments_result %-->
|
||||||
<h5 id="comment_<!--% comment.id %-->">Comment #<!--% comment_index %--> posted on <!--% comment.comment_timestamp %--> by <!--% comment.comment_author_name %--></h5>
|
<h5 id="comment_<!--% comment.id %-->"><a href="/eps/hpr<!--% zero_pad_left(episode.id) %-->/index.html#comment_<!--% comment.id %-->">Comment #<!--% comment_index %--></a> posted on <!--% comment.comment_timestamp %--> by <!--% comment.comment_author_name %--></h5>
|
||||||
<h4><!--% comment.comment_title %--></h4>
|
<h4><!--% comment.comment_title %--></h4>
|
||||||
<!--% comment.comment_text FILTER html_para %-->
|
<!--% comment.comment_text FILTER html_para %-->
|
||||||
<!--% comment_index = comment_index + 1 %-->
|
<!--% comment_index = comment_index + 1 %-->
|
||||||
@@ -109,9 +110,18 @@ Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- . -->
|
<!-- . -->
|
||||||
<tr>
|
<tr>
|
||||||
<td>Who hosted this show?</td>
|
<td>Who is the <strong>host</strong> of this show?</td>
|
||||||
<td>
|
<td>
|
||||||
<input required type="text" name="hostid" size="20" maxlength="5" placeholder="Type the host number"></td>
|
<select required name="hostid" id="hostid">
|
||||||
|
<option value="Spammer" selected="selected">Spammer</option>
|
||||||
|
<option value="Spammer">Linus Torvalds</option>
|
||||||
|
<option value="Spammer">Marie Curie</option>
|
||||||
|
<option value="<!--% episode.hostid %-->"><!--% episode.host %--></option>
|
||||||
|
<option value="Spammer">Alan Turing</option>
|
||||||
|
<option value="Spammer">Terry Pratchett</option>
|
||||||
|
<option value="Spammer">Yuri Gagarin</option>
|
||||||
|
</select>
|
||||||
|
<td>
|
||||||
<td>
|
<td>
|
||||||
<!-- . -->
|
<!-- . -->
|
||||||
<tr>
|
<tr>
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<!-- Creative Commons License -->
|
<!-- Creative Commons License -->
|
||||||
<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" border="0" src="https://creativecommons.org/images/public/somerights20.png" width="88" height="31" /></a><br>The following work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/2.5/">Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License</a>.</p>
|
<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" border="0" src="https://creativecommons.org/images/public/somerights20.png" width="88" height="31" /></a><br>The following work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/2.5/">Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License</a>.</p>
|
||||||
<p>T.W.A.T. Radio was brought to you by <a href="https://en.wikipedia.org/wiki/Infonomicon">The Infonomicon Computer Club</a></p>
|
<p>Today With a Techie Radio was brought to you by <a href="https://en.wikipedia.org/wiki/Infonomicon">The Infonomicon Computer Club</a></p>
|
||||||
<!--% FOREACH twat_episode IN DBI.query('
|
<!--% FOREACH twat_episode IN DBI.query('
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
|
@@ -1,2 +1 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
|
|
||||||
|
@@ -11,34 +11,36 @@
|
|||||||
<!--% img_re = '(?six)^(.*?)\<img ([^\>]+\>)(.+)$' %-->
|
<!--% img_re = '(?six)^(.*?)\<img ([^\>]+\>)(.+)$' %-->
|
||||||
<!--% lazy_re = '(?i)loading="lazy"' %-->
|
<!--% lazy_re = '(?i)loading="lazy"' %-->
|
||||||
<!--% WHILE (matches = lines.match(img_re)) %-->
|
<!--% WHILE (matches = lines.match(img_re)) %-->
|
||||||
<!--% img_tag = matches.1 %-->
|
<!--% img_tag = matches.1 %-->
|
||||||
<!--% after_html = matches.2 %-->
|
<!--% after_html = matches.2 %-->
|
||||||
<!--% matches.0 %-->
|
<!--% matches.0 %-->
|
||||||
<!--% IF (img_tag.search(lazy_re)) %-->
|
<!--% IF (img_tag.search(lazy_re)) %-->
|
||||||
<img <!--% img_tag %-->
|
<img <!--% img_tag %-->
|
||||||
<!--% ELSE %-->
|
<!--% ELSE %-->
|
||||||
<img loading="lazy" <!--% img_tag %-->
|
<img loading="lazy" <!--% img_tag %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<!--% lines = after_html %-->
|
<!--% lines = after_html %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<!--% after_html %-->
|
<!--% after_html %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<hr>
|
<hr>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h3>Welcome to HPR the Community Podcast</h3>
|
<h3>Welcome to HPR, the Community Podcast</h3>
|
||||||
</header>
|
</header>
|
||||||
<!--% days_till_next_episode = 0 %-->
|
<!--% days_till_next_episode = 0 %-->
|
||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<!--% FOREACH next_available_episode_result IN DBI.query(query_next_available_episode)
|
|
||||||
%-->
|
|
||||||
<!--% USE date %-->
|
<!--% USE date %-->
|
||||||
<!--% calc = date.calc %-->
|
<!--% calc = date.calc %-->
|
||||||
<!--% days_till_next_episode = calc.Delta_Days(date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d'),next_available_episode_result.last_year,next_available_episode_result.last_month,next_available_episode_result.last_day) %-->
|
<!--% episodes = DBI.query(query_next_available_episode).get_all() %-->
|
||||||
<!--% END %-->
|
<!--% last_date = episodes.0.date.split('-') %-->
|
||||||
<!--% USE date %-->
|
<!--% offset = (calc.Day_of_Week(last_date.0,last_date.1,last_date.2) == 5 ? 3 : 1) %-->
|
||||||
|
<!--% slot_date = calc.Add_Delta_Days(last_date.0,last_date.1,last_date.2,offset) %-->
|
||||||
|
<!--% now = calc.Today() %-->
|
||||||
|
<!--% 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')) %-->
|
<!--% 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_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#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">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>
|
</article>
|
||||||
<!--% display_call_for_shows() %-->
|
<!--% display_call_for_shows() %-->
|
||||||
<hr>
|
<hr>
|
||||||
@@ -54,7 +56,7 @@
|
|||||||
<h3><!--% latest_episodes.summary%--></h3>
|
<h3><!--% latest_episodes.summary%--></h3>
|
||||||
<p class="meta"$><!--% show_avatar(latest_episodes.hostid, latest_episodes.host, host_cnt) %-->
|
<p class="meta"$><!--% show_avatar(latest_episodes.hostid, latest_episodes.host, host_cnt) %-->
|
||||||
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(latest_episodes.hostid) %-->.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% display_explicit(latest_episodes.explicit) %--> and released under a <!--% latest_episodes.license %--> license. <br>
|
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(latest_episodes.hostid) %-->.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% display_explicit(latest_episodes.explicit) %--> and released under a <!--% latest_episodes.license %--> license. <br>
|
||||||
<!--% display_tags(latest_episodes.tags) %-->
|
<!--% display_tags(latest_episodes.tags) %-->
|
||||||
<span><!--% show_series(latest_episodes.series, latest_episodes.seriesid) %--></span>
|
<span><!--% show_series(latest_episodes.series, latest_episodes.seriesid) %--></span>
|
||||||
<span><label>Comments: </label><!--% display_comments_tally(latest_episodes.id, latest_episodes.eps_tally) %--></span><br>
|
<span><label>Comments: </label><!--% display_comments_tally(latest_episodes.id, latest_episodes.eps_tally) %--></span><br>
|
||||||
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
|
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
|
||||||
@@ -72,7 +74,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<h1>Previous five weeks</h1>
|
<h1>Previous five weeks</h1>
|
||||||
</header>
|
</header>
|
||||||
<!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes)
|
<!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes)
|
||||||
%-->
|
%-->
|
||||||
<!--% show_summary(last_5_weeks_episodes) %-->
|
<!--% show_summary(last_5_weeks_episodes) %-->
|
||||||
<p class="listen-in"><!--% display_listen_in(last_5_weeks_episodes.id) %--></p>
|
<p class="listen-in"><!--% display_listen_in(last_5_weeks_episodes.id) %--></p>
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<li>Installing a VPN to your home network</li>
|
<li>Installing a VPN to your home network</li>
|
||||||
<li>Init and System.d</li>
|
<li>Init and System.d</li>
|
||||||
<li>Episodes for the <a href="<!--% absolute_url(baseurl,'series/0007.html') %-->">LPI</a>, or the Networking series.</li>
|
<li>Episodes for the <a href="<!--% absolute_url(baseurl,'series/0007.html') %-->">LPI</a>, or the Networking series.</li>
|
||||||
<li><a href="http://opensourcemusician.com/index.php/Beginning_Audio_Series_for_HPR_and_OSMP_Release">Beginning Audio Series for HPR and OSMP Release</a></li>
|
<li><a href="https://web.archive.org/web/20160629174556/opensourcemusician.com/index.php/Beginning_Audio_Series_for_HPR_and_OSMP_Release">Beginning Audio Series for HPR and OSMP Release</a></li>
|
||||||
<li>Hackintosh computers - what are they, why would you want one.</li>
|
<li>Hackintosh computers - what are they, why would you want one.</li>
|
||||||
<li>Grub 2.0 introduction and customization.</li>
|
<li>Grub 2.0 introduction and customization.</li>
|
||||||
<li>FM Transmitter hack to listen into internet streams</li>
|
<li>FM Transmitter hack to listen into internet streams</li>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<h1>RSS Syndication</h1>
|
<h1>RSS Syndication</h1>
|
||||||
<p><small><em><a href="<!--% absolute_path(baseurl) %-->syndication.html">Advanced Settings</a>.</em></small></p>
|
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
@@ -78,12 +77,16 @@
|
|||||||
<li><a href="<!--% absolute_path(baseurl) %-->comments.rss">Listener contributed comments to the episodes</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->comments.rss">Listener contributed comments to the episodes</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</article>
|
</article>
|
||||||
|
<hr />
|
||||||
|
<h1>Other Download Options</h1>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>Site Replication Sources</h2>
|
<h2>Site Replication Sources</h2>
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->hpr.sql">Daily Database Dump in SQL Format</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->hpr.sql">Daily Database Dump in SQL Format</a></li>
|
||||||
|
<li><a href="https://repo.anhonesthost.net/explore/repos">All the HPR Source Code is on GitTea</a></li>
|
||||||
|
<li><a href="https://hub.hackerpublicradio.org/stats.json">Current Statistics on the HPR Project (updated every 15 mins)</a></li>
|
||||||
<ul>
|
<ul>
|
||||||
</article>
|
</article>
|
||||||
<article>
|
<article>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<li><a href="<!--% absolute_path(baseurl) %-->index.html"><strong>Home »</strong></a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->index.html"><strong>Home »</strong></a></li>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->syndication.html">Get Shows</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->syndication.html">Get Shows</a></li>
|
||||||
<li><a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">Give Shows</a></li>
|
<li><a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">Give Shows</a></li>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->help_out.html">Contribute</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->about.html#how_to_help">Contribute</a></li>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->tags.html">Tags</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->tags.html">Tags</a></li>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->about.html">About</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->about.html">About</a></li>
|
||||||
<li><a href="<!--% absolute_path(baseurl) %-->search.html">Search</a></li>
|
<li><a href="<!--% absolute_path(baseurl) %-->search.html">Search</a></li>
|
||||||
|
@@ -75,7 +75,7 @@
|
|||||||
<li><a href="http://audio.textfiles.com/shows/radiofreekamerica/">Radio Freek America</a></li>
|
<li><a href="http://audio.textfiles.com/shows/radiofreekamerica/">Radio Freek America</a></li>
|
||||||
<li><a href="http://audio.textfiles.com/shows/binrev/">BinRev Radio</a></li>
|
<li><a href="http://audio.textfiles.com/shows/binrev/">BinRev Radio</a></li>
|
||||||
<li><a href="http://audio.textfiles.com/shows/infonomicon/">Infonomicon</a></li>
|
<li><a href="http://audio.textfiles.com/shows/infonomicon/">Infonomicon</a></li>
|
||||||
<li><a href="http://audio.textfiles.com/shows/twat/">Talk With a Techie</a></li>
|
<li><a href="http://audio.textfiles.com/shows/twat/">Today With a Techie</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="column">
|
<nav class="column">
|
||||||
@@ -86,6 +86,7 @@
|
|||||||
<li><a href="https://matrix.to/#/#hpr:matrix.org" >Matrix</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>
|
<li><a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0" >Mumble</a></li>
|
||||||
<li><a href="https://web.libera.chat/gamja/?channels=oggcastplanet" target="_blank">#oggcastplanet</a></li>
|
<li><a href="https://web.libera.chat/gamja/?channels=oggcastplanet" target="_blank">#oggcastplanet</a></li>
|
||||||
|
<li><a href="https://t.me/+6fEhQrf5IEc4ZGU8">Telegram</a></li>
|
||||||
<li><a href="https://twitter.com/HPR">Twitter.com</a></li>
|
<li><a href="https://twitter.com/HPR">Twitter.com</a></li>
|
||||||
<li><a href="https://www.facebook.com/HenryPartickReilly" target="_blank">Facebook</a></li>
|
<li><a href="https://www.facebook.com/HenryPartickReilly" target="_blank">Facebook</a></li>
|
||||||
<li><a href="https://www.linkedin.com/company/hackerpublicradio/" target="_blank">Linked-In</a></li>
|
<li><a href="https://www.linkedin.com/company/hackerpublicradio/" target="_blank">Linked-In</a></li>
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://freeculturepodcasts.org/">Free Culture Podcasts</a></li>
|
<li><a href="https://freeculturepodcasts.org/">Free Culture Podcasts</a></li>
|
||||||
<li><a href="https://archive.org/details/hackerpublicradio">archive.org</a></li>
|
<li><a href="https://archive.org/details/hackerpublicradio">archive.org</a></li>
|
||||||
|
<li><a href="https://repo.anhonesthost.net/explore/repos" >HPR Source Code</a></li>
|
||||||
<li><a href="https://cchits.net/">cchits.net</a></li>
|
<li><a href="https://cchits.net/">cchits.net</a></li>
|
||||||
<li><a href="https://freesound.org/">freesound.org</a></li>
|
<li><a href="https://freesound.org/">freesound.org</a></li>
|
||||||
<li><a href="https://librivox.org/">librivox.org</a></li>
|
<li><a href="https://librivox.org/">librivox.org</a></li>
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
<!--% query_hpr_shows = '
|
<!--% query_hpr_shows = '
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.duration,
|
eps.date, eps.license, eps.duration,
|
||||||
eps.title, eps.summary, eps.tags,
|
eps.title, eps.summary, eps.tags,
|
||||||
eps.notes,
|
eps.notes,
|
||||||
hosts.local_image,
|
hosts.local_image,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email,
|
hosts.host, hosts.email, hosts.profile,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid
|
miniseries.name AS series, miniseries.id AS seriesid
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
ORDER BY eps.id DESC
|
ORDER BY eps.id DESC
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
<!--% query_hpr_shows = '
|
<!--% query_hpr_shows = '
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.duration,
|
eps.date, eps.license, eps.duration,
|
||||||
eps.title, eps.summary, eps.tags,
|
eps.title, eps.summary, eps.tags,
|
||||||
eps.notes,
|
eps.notes,
|
||||||
hosts.local_image,
|
hosts.local_image,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email,
|
hosts.host, hosts.email, hosts.profile,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid
|
miniseries.name AS series, miniseries.id AS seriesid
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
|
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
|
||||||
ORDER BY eps.id + 0 DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
|
@@ -1,58 +1,54 @@
|
|||||||
<!--% query_next_available_episode = '
|
<!--% query_next_available_episode = '
|
||||||
WITH next_id AS (
|
SELECT id, date FROM eps e WHERE id = (
|
||||||
SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
|
SELECT id + 1 FROM eps mo
|
||||||
FROM eps
|
WHERE NOT EXISTS (
|
||||||
WHERE eps.date > NOW()
|
SELECT NULL
|
||||||
)
|
FROM eps mi
|
||||||
SELECT
|
WHERE mi.id = mo.id + 1
|
||||||
MIN(next_id.id_next) AS \'next_id\',
|
)
|
||||||
DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%Y\') AS \'last_year\',
|
ORDER BY id
|
||||||
DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%d\') AS \'last_day\',
|
LIMIT 1) - 1
|
||||||
DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%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 = '
|
<!--% query_latest_episodes = '
|
||||||
WITH comment_tallies AS (
|
WITH comment_tallies AS (
|
||||||
SELECT
|
SELECT
|
||||||
eps_id,
|
eps_id,
|
||||||
COUNT(eps_id) AS eps_tally
|
COUNT(eps_id) AS eps_tally
|
||||||
FROM comments
|
FROM comments
|
||||||
GROUP BY eps_id
|
GROUP BY eps_id
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
eps.explicit,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.duration,
|
eps.date, eps.license, eps.duration,
|
||||||
eps.title, eps.summary, eps.tags,
|
eps.title, eps.summary, eps.tags,
|
||||||
eps.notes,
|
eps.notes,
|
||||||
hosts.local_image,
|
hosts.local_image,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email,
|
hosts.host, hosts.email,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid,
|
miniseries.name AS series, miniseries.id AS seriesid,
|
||||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||||
WHERE eps.date <= UTC_DATE()
|
WHERE eps.date <= UTC_DATE()
|
||||||
ORDER BY eps.id DESC
|
ORDER BY eps.id DESC
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
<!--% query_last_5_weeks_episodes = '
|
<!--% query_last_5_weeks_episodes = '
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.title, eps.summary,
|
eps.date, eps.license, eps.title, eps.summary,
|
||||||
eps.duration, eps.notes, eps.tags,
|
eps.duration, eps.notes, eps.tags,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email, hosts.local_image,
|
hosts.host, hosts.email, hosts.local_image,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid
|
miniseries.name AS series, miniseries.id AS seriesid
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE eps.date <= UTC_DATE()
|
WHERE eps.date <= UTC_DATE()
|
||||||
ORDER BY eps.id DESC
|
ORDER BY eps.id DESC
|
||||||
|
@@ -1,58 +1,54 @@
|
|||||||
<!--% query_next_available_episode = '
|
<!--% query_next_available_episode = '
|
||||||
WITH next_id AS (
|
SELECT id, date FROM eps e WHERE id = (
|
||||||
SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
|
SELECT id + 1 FROM eps mo
|
||||||
FROM eps
|
WHERE NOT EXISTS (
|
||||||
WHERE eps.date > date(\'now\')
|
SELECT NULL
|
||||||
)
|
FROM eps mi
|
||||||
SELECT
|
WHERE mi.id = mo.id + 1
|
||||||
MIN(next_id.id_next) AS \'next_id\',
|
)
|
||||||
strftime(\'%Y\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_year\',
|
ORDER BY id
|
||||||
strftime(\'%d\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_day\',
|
LIMIT 1) - 1
|
||||||
strftime(\'%m\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_month\'
|
'
|
||||||
FROM next_id
|
|
||||||
LEFT JOIN eps ON next_id.id_next = eps.id
|
|
||||||
WHERE eps.id IS NULL
|
|
||||||
'
|
|
||||||
%-->
|
%-->
|
||||||
<!--% query_latest_episodes = '
|
<!--% query_latest_episodes = '
|
||||||
WITH comment_tallies AS (
|
WITH comment_tallies AS (
|
||||||
SELECT
|
SELECT
|
||||||
eps_id,
|
eps_id,
|
||||||
COUNT(eps_id) AS eps_tally
|
COUNT(eps_id) AS eps_tally
|
||||||
FROM comments
|
FROM comments
|
||||||
GROUP BY eps_id
|
GROUP BY eps_id
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
eps.explicit,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.duration,
|
eps.date, eps.license, eps.duration,
|
||||||
eps.title, eps.summary, eps.tags,
|
eps.title, eps.summary, eps.tags,
|
||||||
eps.notes,
|
eps.notes,
|
||||||
hosts.local_image,
|
hosts.local_image,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email,
|
hosts.host, hosts.email,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid,
|
miniseries.name AS series, miniseries.id AS seriesid,
|
||||||
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||||
WHERE eps.date <= date(\'now\')
|
WHERE eps.date <= date(\'now\')
|
||||||
ORDER BY eps.id + 0 DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
<!--% query_last_5_weeks_episodes = '
|
<!--% query_last_5_weeks_episodes = '
|
||||||
SELECT
|
SELECT
|
||||||
eps.id,
|
eps.id,
|
||||||
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
eps.explicit,
|
||||||
eps.date, eps.license, eps.title, eps.summary,
|
eps.date, eps.license, eps.title, eps.summary,
|
||||||
eps.duration, eps.notes, eps.tags,
|
eps.duration, eps.notes, eps.tags,
|
||||||
hosts.hostid,
|
hosts.hostid,
|
||||||
hosts.host, hosts.email, hosts.local_image,
|
hosts.host, hosts.email, hosts.local_image,
|
||||||
miniseries.name AS series, miniseries.id AS seriesid
|
miniseries.name AS series, miniseries.id AS seriesid
|
||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE eps.date <= date(\'now\')
|
WHERE eps.date <= date(\'now\')
|
||||||
ORDER BY eps.id + 0 DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
xmlns:googleplay="https://www.google.com/schemas/play-podcasts/1.0"
|
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
|
||||||
xmlns:atom="https://www.w3.org/2005/Atom"
|
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
|
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
|
||||||
<channel>
|
<channel>
|
||||||
<title>Hacker Public Radio</title>
|
<title>Hacker Public Radio</title>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<itunes:category text="Education">
|
<itunes:category text="Education">
|
||||||
<itunes:category text="Training"/>
|
<itunes:category text="Training"/>
|
||||||
</itunes:category>
|
</itunes:category>
|
||||||
<itunes:image href="<!--% absolute_url(baseurl) %-->images/hpr_feed_itunes.png"/>
|
<itunes:image href="<!--% absolute_url(http_baseurl) %-->images/hpr_feed_itunes.png"/>
|
||||||
<itunes:explicit>yes</itunes:explicit>
|
<itunes:explicit>yes</itunes:explicit>
|
||||||
<itunes:author>Hacker Public Radio</itunes:author>
|
<itunes:author>Hacker Public Radio</itunes:author>
|
||||||
<itunes:keywords>Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom</itunes:keywords>
|
<itunes:keywords>Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom</itunes:keywords>
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
</itunes:owner>
|
</itunes:owner>
|
||||||
<webMaster>admin@hackerpublicradio.org (HPR Volunteer)</webMaster>
|
<webMaster>admin@hackerpublicradio.org (HPR Volunteer)</webMaster>
|
||||||
<generator>site-generator</generator>
|
<generator>site-generator</generator>
|
||||||
<docs>https://www.rssboard.org/rss-specification</docs>
|
<docs>http://www.rssboard.org/rss-specification</docs>
|
||||||
<ttl>43200</ttl>
|
<ttl>720</ttl>
|
||||||
<skipDays>
|
<skipDays>
|
||||||
<day>Saturday</day>
|
<day>Saturday</day>
|
||||||
<day>Sunday</day>
|
<day>Sunday</day>
|
||||||
@@ -47,9 +47,9 @@
|
|||||||
<googleplay:author>HPR Volunteer</googleplay:author>
|
<googleplay:author>HPR Volunteer</googleplay:author>
|
||||||
<googleplay:description>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.</googleplay:description>
|
<googleplay:description>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.</googleplay:description>
|
||||||
<googleplay:email>admin@hackerpublicradio.org</googleplay:email>
|
<googleplay:email>admin@hackerpublicradio.org</googleplay:email>
|
||||||
<googleplay:image href="<!--% absolute_url(baseurl) %-->images/hpr_feed_itunes.png"/>
|
<googleplay:image href="<!--% absolute_url(http_baseurl) %-->images/hpr_feed_itunes.png"/>
|
||||||
<googleplay:category text="Technology"/>
|
<googleplay:category text="Technology"/>
|
||||||
<atom:link href="<!--% absolute_url(baseurl) %--><!--% filename %-->" rel="self" type="application/rss+xml" />
|
<atom:link href="<!--% absolute_url(http_baseurl) %--><!--% filename %-->" rel="self" type="application/rss+xml" />
|
||||||
<pubDate><!--% format_feed_date(date.now) %--></pubDate>
|
<pubDate><!--% format_feed_date(date.now) %--></pubDate>
|
||||||
|
|
||||||
<!--% INCLUDE $content %-->
|
<!--% INCLUDE $content %-->
|
||||||
|
@@ -57,7 +57,7 @@ or
|
|||||||
|
|
||||||
<!--% MACRO twat_show_summary(show, hide_host) BLOCK %-->
|
<!--% MACRO twat_show_summary(show, hide_host) BLOCK %-->
|
||||||
|
|
||||||
<h3 class="title"><a href="<!--% absolute_path(baseurl) %-->eps/twat<!--% zero_pad_left(show.id) %-->/index.html">twat<!--% show.id %--> :: <!--% show.title %--></a> <!--% IF hide_host == "" %-->
|
<h3 class="title"><a href="<!--% absolute_path(baseurl) %-->eps/twat<!--% zero_pad_left(show.id) %-->/index.html">Today with a Techie Ep.<!--% show.id %--> :: <!--% show.title %--></a> <!--% IF hide_host == "" %-->
|
||||||
hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(show.hostid) %-->.html"><!--% show.host %--></a>
|
hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(show.hostid) %-->.html"><!--% show.host %--></a>
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
</h3>
|
</h3>
|
||||||
|
@@ -1,24 +1,25 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
<!--% MACRO display_item(episode, file_extension, audio_mime_type) BLOCK %-->
|
<!--% MACRO display_item(episode, file_extension, audio_mime_type) BLOCK %-->
|
||||||
<!--% USE HTML.Strip %-->
|
<!--% USE HTML.Strip emit_spaces = 0 %-->
|
||||||
<!--% IF audio_mime_type == "" %-->
|
<!--% IF audio_mime_type == "" %-->
|
||||||
<!--% audio_mime_type = 'ogg' %-->
|
<!--% audio_mime_type = 'ogg' %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<item>
|
<item>
|
||||||
<itunes:explicit><!--% display_explicit_feed(episode.explicit) %--></itunes:explicit>
|
<itunes:explicit><!--% display_explicit_feed(episode.explicit) %--></itunes:explicit>
|
||||||
<googleplay:explicit><!--% display_explicit_feed(episode.explicit) %--></googleplay:explicit>
|
<googleplay:explicit><!--% display_explicit_feed_2(episode.explicit) %--></googleplay:explicit>
|
||||||
<title>HPR<!--% zero_pad_left(episode.id) %-->: <!--% episode.title %--></title>
|
<title>HPR<!--% zero_pad_left(episode.id) %-->: <!--% episode.title | html_strip | xml_entity %--></title>
|
||||||
<author><!--% episode.email %--> (<!--% episode.host %-->)</author>
|
<author><!--% episode.email %--> (<!--% episode.host %-->)</author>
|
||||||
<googleplay:author><!--% episode.email %--> (<!--% episode.host %-->)</googleplay:author>
|
<googleplay:author><!--% episode.email %--> (<!--% episode.host %-->)</googleplay:author>
|
||||||
<itunes:author><!--% episode.email %--> (<!--% episode.host %-->)</itunes:author>
|
<itunes:author><!--% episode.email %--> (<!--% episode.host %-->)</itunes:author>
|
||||||
<googleplay:image href="<!--% absolute_url(baseurl) %-->images/hpr_feed_itunes.png"/>
|
<googleplay:image href="<!--% absolute_url(http_baseurl) %-->images/hpr_feed_itunes.png"/>
|
||||||
<link><!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.id) %-->/index.html</link>
|
<link><!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.id) %-->/index.html</link>
|
||||||
<description><![CDATA[<!--% episode.notes %-->]]>
|
<description><![CDATA[<!--% episode.notes %-->]]>
|
||||||
</description>
|
</description>
|
||||||
<itunes:summary><![CDATA[<!--% episode.notes.substr(0, 4000) | html_strip | xml_entity %-->]]>
|
<itunes:summary><![CDATA[<!--% episode.notes.substr(0, 4000) | html_strip | xml_entity %-->]]>
|
||||||
</itunes:summary>
|
</itunes:summary>
|
||||||
<pubDate><!--% format_feed_date(episode.date) %--></pubDate>
|
<pubDate><!--% format_feed_date(episode.date) %--></pubDate>
|
||||||
<enclosure url="<!--% baseurl %-->eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.length %-->" type="audio/<!--% audio_mime_type %-->"/>
|
<enclosure url="<!--% http_baseurl %-->eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.length %-->" type="audio/<!--% audio_mime_type %-->"/>
|
||||||
<guid><!--% baseurl %-->eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %--></guid>
|
<guid><!--% http_baseurl %-->eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %--></guid>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
@@ -35,6 +35,10 @@
|
|||||||
<!--% display_choice(is_explicit, 'yes', 'no') %-->
|
<!--% display_choice(is_explicit, 'yes', 'no') %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
|
||||||
|
<!--% MACRO display_explicit_feed_2(is_explicit) BLOCK %-->
|
||||||
|
<!--% display_choice(is_explicit, 'Yes', 'No') %-->
|
||||||
|
<!--% END %-->
|
||||||
|
|
||||||
<!--% MACRO format_feed_date(date_to_format) BLOCK %-->
|
<!--% MACRO format_feed_date(date_to_format) BLOCK %-->
|
||||||
<!--% USE feed_date = date(format = '%a, %d %b %Y %H:%M:%S +0000', gmt=1) %-->
|
<!--% USE feed_date = date(format = '%a, %d %b %Y %H:%M:%S +0000', gmt=1) %-->
|
||||||
<!--% feed_date.format(date_to_format) %-->
|
<!--% feed_date.format(date_to_format) %-->
|
||||||
|
73
utils/check-dependencies.sh
Executable file
73
utils/check-dependencies.sh
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
#!/bin/bash -
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
# FILE: check-dependencies.sh
|
||||||
|
#
|
||||||
|
# USAGE: ./check-dependencies.sh
|
||||||
|
#
|
||||||
|
# DESCRIPTION: Check that Perl module dependencies for the hpr_generator
|
||||||
|
# are installed.
|
||||||
|
#
|
||||||
|
# OPTIONS: ---
|
||||||
|
# REQUIREMENTS: ---
|
||||||
|
# BUGS: ---
|
||||||
|
# NOTES: ---
|
||||||
|
# AUTHOR: Roan "Rho`n" Horning (roan.horning@gmail.com)
|
||||||
|
# ORGANIZATION:
|
||||||
|
# CREATED: 09/05/2024 09:55:00 PM
|
||||||
|
# REVISION: ---
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
|
set -o nounset # Treat unset variables as an error
|
||||||
|
|
||||||
|
#--- FUNCTION ----------------------------------------------------------------
|
||||||
|
# NAME: is_module_installed
|
||||||
|
# DESCRIPTION: Tests if the supplied module is found on the system
|
||||||
|
# PARAMETERS: Name of the denpendent Perl module
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
||||||
|
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}"
|
||||||
|
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}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Finished scanning."
|
Reference in New Issue
Block a user