Archived
4
2

70 Commits

Author SHA1 Message Date
Roan Horning
b4e4187902 Merge pull request 'Fix URL's to series RSS feeds' (#80) from I78_Fix-link-to-series-RSS-links into main
Reviewed-on: #80
2023-02-26 04:13:06 +00:00
431126e8a3 Fix URL's to series RSS feeds 2023-02-25 23:06:41 -05:00
Roan Horning
91ceefd88e Merge pull request '[I62] Hide display of future shows on series pages' (#79) from I62_Hide-display-of-future-shows-on-series-pages into main
Reviewed-on: #79
2023-02-25 20:11:11 +00:00
8feb37e831 Hide display of future shows on series episodes page 2023-02-25 14:22:44 -05:00
4a34496f24 Hide display of future shows on series listings page 2023-02-25 11:44:56 -05:00
Roan Horning
f7e54233e2 Merge pull request '[I12] Implement comments_viewer page' (#77) from I12_Implement-comments-viewer into main
Reviewed-on: #77
2023-02-25 01:44:50 +00:00
59875e772e Implement comments_viewer page 2023-02-24 20:42:01 -05:00
Roan Horning
f84ee71b7c Merge pull request '[I75] Fix missing show transcipts[' (#76) from I75_Fix-missing-show-transcipts into main
Reviewed-on: #76
2023-02-25 00:06:18 +00:00
927424901b Add show_transcript MACRO to index and episode pages 2023-02-24 18:58:56 -05:00
27a84529c6 Create shared template for showing show transcripts
Used in main index page and individual episode pages.
2023-02-24 18:57:20 -05:00
59549daa63 Fix archive.org paths in media_path MACRO 2023-02-24 18:55:37 -05:00
Roan Horning
ec7a6ce379 Merge pull request 'Refactor RSS templates for either MySQL or SQLite' (#74) from I73-Fix_queries_for-RSS_feeds into main
Reviewed-on: #74
2023-02-21 03:41:55 +00:00
756bdc0fa1 Refactor RSS templates for either MySQL or SQLite 2023-02-20 22:36:30 -05:00
b2eaea1eb8 Improve look of hosts table 2023-02-12 16:54:17 -05:00
Roan Horning
fe9bf574cf Merge pull request 'Update sydication template text' (#69) from I67-Update_syndication_page into main
Reviewed-on: #69
2023-02-12 19:36:17 +00:00
309ea05c15 Update sydication template text
Now matches what is in the syndication.php page on
hakerpublicradio.org
2023-02-12 13:46:11 -05:00
Roan Horning
649d6c3746 Merge pull request 'Make tags page menu link hard coded' (#68) from I63_Fix-menu-link-to-tags-page into main
Reviewed-on: #68
2023-02-12 18:10:12 +00:00
e41f6029aa Make tags page menu link hard coded
Not implementing tags page in the static generator yet.
Make the link point to the php page on hackerpublicradio.org.
2023-02-12 13:07:06 -05:00
Roan Horning
4bd7c6f867 Merge pull request 'I64_Implement-Show-Transcript-section' (#66) from I64_Implement-Show-Transcript-section into main
Reviewed-on: #66
2023-02-12 16:07:47 +00:00
138b0fdd1b Add Show Transcript section to episode template 2023-02-12 10:58:43 -05:00
d437e66f0e Update media_path MACRO for archive.org transciption files
The whisper transcription files are stored one directory
deeper on archive.org. Add checks and correct path when
passed txt, srt, or vtt media_type.
2023-02-12 10:53:50 -05:00
Roan Horning
a213efa695 Merge pull request '[I57] MySQL implementation' (#65) from MySQL into main
Reviewed-on: #65
2023-02-12 12:59:13 +00:00
Roan Horning
314127441c Merge branch 'main' into MySQL 2023-02-12 12:57:38 +00:00
2a486cb58b Add SQLite specific query templates 2023-02-08 16:05:36 -05:00
7c44f6b680 Remove New Year's Eve 2023 show announcement 2023-01-03 10:08:52 -05:00
71a63e1beb Merge branch 'main' into MySQL 2022-12-31 18:39:25 -05:00
8e1232517a Update New Year's Eve show 2023 2022-12-31 15:55:39 -05:00
cb65d25cfc Refactor MySQL database specific SQL 2022-11-28 22:47:53 -05:00
2b4802508d Remove superflous WHERE condition 2022-11-28 19:55:51 -05:00
1312e3d374 Refactor MySQL database specific SQL 2022-11-28 19:52:39 -05:00
3cc6da57ad Refactor MySQL database specific SQL 2022-11-28 19:49:06 -05:00
675f8fa9d5 Refactor MySQL database specific SQL 2022-11-27 14:04:12 -05:00
6f28bb2a16 Refactor MySQL database specific SQL 2022-11-27 13:54:14 -05:00
cb881558ca Add database type constant for use in templates
This is used to select which database specific SQL query to use.
2022-11-27 13:11:14 -05:00
4e8edf2640 Merge branch 'main' into MySQL 2022-11-11 20:27:47 -05:00
Roan Horning
e86d2c010d Merge pull request '[I60] Implement call for shows feature' (#61) from I60_call-for-shows into main
Reviewed-on: #61
2022-11-11 03:18:38 +00:00
f0fa21ae45 Implement call for shows feature
Add display_call_for_shows MACRO. Update index template to include
call to display_call_for_shows.
2022-11-10 22:14:55 -05:00
0b99483f0d Update installation instruction to include details for MySQL 2022-10-22 21:11:57 -04:00
8c3874ad8b Convert hpr total rss queries from SQLite to MySQL 2022-10-21 23:00:03 -04:00
6f95a33e67 Convert hpr rss queries from SQLite to MySQL 2022-10-21 22:53:13 -04:00
979c8b43e5 Convert twat episode page queries from SQLite to MySQL 2022-10-21 20:43:22 -04:00
e3abe5fd68 Convert series episode page queries from SQLite to MySQL 2022-10-21 20:11:19 -04:00
5612eeed42 Convert episode page queries from SQLite to MySQL 2022-10-21 20:07:53 -04:00
4af117fb7a Convert episodes page queries from SQLite to MySQL 2022-10-21 19:52:53 -04:00
e1b0189275 Convert correspondent page queries from SQLite to MySQL 2022-10-21 19:46:31 -04:00
aad77f3c78 Convert index page queries from SQLite to MySQL 2022-10-20 23:24:56 -04:00
be1344e10c Update database connection information 2022-10-20 23:23:00 -04:00
Roan Horning
308d03d63c Merge pull request '[I55] announcements template' (#56) from I55_announcements-template into main
Reviewed-on: #56
2022-10-16 23:11:14 +00:00
0837e11bfe Include announcement template in index template 2022-10-16 18:56:13 -04:00
06ace35c41 Add announcement template 2022-10-16 18:23:51 -04:00
6d0d1b99a6 Add page mumble-howto 2022-10-16 18:12:05 -04:00
fdeff3879a Update links in the comments section of the episode template 2022-10-09 15:45:22 -04:00
b667c30d40 Update links on syndication page
Add missing external links. Update comments feed link to new statically
generated file.
2022-10-09 13:51:00 -04:00
b08f5c30df Add missing USE date directive
Worked without it in local dev, but needed on hpr.horning.us
2022-10-08 12:35:56 -04:00
Roan Horning
d8613143d3 Merge pull request '[I41] Implement comments feed' (#54) from I41_Implement-comments-feed into main
Reviewed-on: #54
2022-10-08 13:34:45 +00:00
3de4476a3f Add comments feed template 2022-10-08 08:52:47 -04:00
4984ac3383 Add MACRO rss_show_series 2022-10-08 08:48:42 -04:00
e4463dc5ba Zero pad the day's date 2022-10-08 08:44:47 -04:00
Roan Horning
bf8bf8daad Merge pull request '[I52] Allow audio content to be hosted on at different url' (#53) from I52_media_urls into main
Reviewed-on: #53
2022-10-02 18:17:14 +00:00
1d4e6e15b7 Refactor templates to use media_path MACRO 2022-10-01 13:42:46 -04:00
d556e28e2d Consume root_template properties generically
Allow user to define root_template properties in the site.cfg file
without need to modify site_generator program.
2022-10-01 13:33:59 -04:00
fb70ae6253 Add media_path MACRO to shared utilities
Generate the full URL of an audio file.
2022-10-01 13:23:36 -04:00
64ae9c4f86 Refactor media_baseurl MACRO to media_basepath MACRO
Prevent name collision with media_basepath root_template/page property
of same name. Also fix application of trailing forward slash to path
based on existence of baseurl property.
2022-10-01 13:18:35 -04:00
b0d31ee507 Allow user to modify zero_pad_left MACRO's padding
Add optional pad length argument
2022-10-01 12:51:11 -04:00
Roan Horning
6ac65212d7 Merge pull request '[I50] Fix ordering by episode id' (#51) from I50_Fix-ordering-by-episode-id into main
Reviewed-on: #51
2022-09-22 01:47:25 +00:00
991b3dcec1 Update SQL query to order results by id 2022-09-21 21:18:48 -04:00
Roan Horning
1c9eb16934 Merge pull request '[I48] Fix MACRO step_navigation' (#49) from I48_Fix-step-navigation into main
Reviewed-on: #49
2022-09-20 02:03:41 +00:00
2eaaa11a69 Fix MACRO step_navigation
Check for existence of folder arg instead of empty value.
2022-09-19 22:00:18 -04:00
3723303e31 Fix absolute path for media links 2022-09-18 19:21:19 -04:00
Roan Horning
db46938de6 Merge pull request '[I46] Extract Listen Now markup to macro' (#47) from I46_Extract-Listen-Now-markup-to-macro into main
Reviewed-on: #47
2022-09-18 20:32:32 +00:00
70 changed files with 1021 additions and 253 deletions

View File

@@ -3,12 +3,22 @@ Static web page generator for the Hacker Public Radio website.
## Installation ## Installation
* Clone or download this repository * Clone or download this repository
* Create the sqlite3 database from the files in the _sql directory. The default name for the database file is "hpr.db" and should be located in the root of the project directory. The name and location can be set in the site.cfg file. * With SQLite
* Two sql helper scripts are available to generate an empty database or a database filled with test data. * Create the sqlite3 database from the files in the _sql directory. The default name for the database file is "hpr.db" and should be located in the root of the project directory. The name and location can be set in the site.cfg file.
* Two sql helper scripts are available to generate an empty database or a database filled with test data.
- For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db` - For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db`
- For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db` - For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db`
* 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
* 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.) * Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
* GetOpt * GetOpt
* Pod::Usage * Pod::Usage
@@ -18,7 +28,7 @@ Static web page generator for the Hacker Public Radio website.
* Template::Plugin::DBI * Template::Plugin::DBI
* DBI * DBI
* Tie::DBI * Tie::DBI
* DBD::SQLite * DBD::SQLite or DBD:mysql
* Date::Calc * Date::Calc
## Usage ## Usage
@@ -50,4 +60,3 @@ and add the label "**Feature Request**".
## Authors and acknowledgment ## Authors and acknowledgment
* Roan "Rho`n" Horning * Roan "Rho`n" Horning

View File

@@ -235,6 +235,17 @@ pre { /* Add background, border and scrollbar to <pre> */
clear: both; clear: both;
} }
table.hosts {
background: white
}
table.hosts tr:nth-child(even) { background-color:#cccccc; }
table.hosts tr:nth-child(odd) { background-color:white; }
table.hosts tr td img { vertical-align:middle }
pre.comment {
white-space: pre-wrap;
padding: 2px;
line-height: 1.2rem;
} }
@media only screen and (max-width: 680px) { @media only screen and (max-width: 680px) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -35,15 +35,27 @@ This is a site generator for the Hacker Public Radio website based upon the Perl
=head1 INSTALLATION =head1 INSTALLATION
With SQLite
* Create the sqlite3 database from the files in the _sql directory. The default name for the * Create the sqlite3 database from the files in the _sql directory. The default name for the
database file is "hpr.db" and should be located in the root of the project directory. The database file is "hpr.db" and should be located in the root of the project directory. The
name and location can be set in the site.cfg file. name and location can be set in the site.cfg file.
* Two sql helper scripts are available to generate an empty database or a database filled with test data. * Two sql helper scripts are available to generate an empty database or a database filled with test data.
- For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db` - For an empty database: cat Create_Database_Empty.sql | sqlite3 hpr.db
- For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db` - For a database with test data: cat Create_Database_Test.sql | sqlite3 hpr.db
* 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.
clauses to sub-queries when using earlier versions of SQLite. Must convert WITH clauses to sub-queries when using earlier versions of SQLite.
* Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
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 * GetOpt
* Pod::Usage * Pod::Usage
* Config::Std * Config::Std
@@ -52,7 +64,7 @@ This is a site generator for the Hacker Public Radio website based upon the Perl
* Template::Plugin::DBI * Template::Plugin::DBI
* DBI * DBI
* Tie::DBI * Tie::DBI
* DBD::SQLite * DBD::SQLite or DBD:mysql
* Date::Calc * Date::Calc
=head1 AUTHOR =head1 AUTHOR
@@ -140,12 +152,13 @@ sub main {
$page_config->{'root_template'} = $config{root_template}{content}; $page_config->{'root_template'} = $config{root_template}{content};
} }
if (exists $config{root_template}{baseurl}) { # Set all config root_template properties as default page config properties
$page_config->{'baseurl'} = $config{root_template}{baseurl}; # except the previously set root_template content property
my @root_args = grep { $_ ne 'content' } keys %{$config{root_template}};
foreach my $root_arg (@root_args) {
if (exists $page_config->{$root_arg} == 0) {
$page_config->{$root_arg} = $config{root_template}{$root_arg};
} }
if (exists $config{root_template}{media_hostname}) {
$page_config->{'media_hostname'} = $config{root_template}{media_hostname};
} }
if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') { if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') {
@@ -185,6 +198,7 @@ sub get_template_html (\%@) {
PRE_CHOMP => 1, PRE_CHOMP => 1,
POST_CHOMP => 1, POST_CHOMP => 1,
CONSTANTS => { CONSTANTS => {
database => $_[0]{database},
driver => $_[0]{driver}, driver => $_[0]{driver},
user => $_[0]{user}, user => $_[0]{user},
password => $_[0]{password}, password => $_[0]{password},

View File

@@ -2,9 +2,10 @@
# with the database. # with the database.
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name> # dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
[DBI] [DBI]
driver: dbi:SQLite:hpr.db database: mysql
user: driver: dbi:mysql:database=hpr_hpr:hostname=localhost
password: user: hpr-generator
password: zBozqN-Z2zNAz
# Configure the root template page which pulls in the navigation and # Configure the root template page which pulls in the navigation and
# content templates used by each page. An optional baseurl property may # content templates used by each page. An optional baseurl property may
@@ -13,6 +14,8 @@ password:
[root_template] [root_template]
content: page.tpl.html content: page.tpl.html
#baseurl: OPTIONAL [i.e. file://<full path to local website directory>] #baseurl: OPTIONAL [i.e. file://<full path to local website directory>]
baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/
media_baseurl: https://archive.org/download/hpr$eps_id/
# Configure the navigation menu and the content templates for each page # Configure the navigation menu and the content templates for each page
# of the site: # of the site:
@@ -137,6 +140,15 @@ navigation: navigation-get-shows.tpl.html
content: content-twat_episode.tpl.html content: content-twat_episode.tpl.html
multipage: true multipage: true
filename: eps/twat[id]/index.html filename: eps/twat[id]/index.html
media_baseurl: https://www.hackerpublicradio.org/eps/
[mumble-howto]
navigation: navigation-about.tpl.html
content: content-mumble-howto.tpl.html
[comments_viewer]
navigation: navigation-about.tpl.html
content: content-comments_viewer.tpl.html
[hpr_ogg] [hpr_ogg]
root_template: rss.tpl.xml root_template: rss.tpl.xml
@@ -175,3 +187,7 @@ root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml content: rss-hpr_total.tpl.xml
filename: hpr_total_spx.rss filename: hpr_total_spx.rss
media_file_extension: spx media_file_extension: spx
[comments]
root_template: rss-comments.tpl.xml
filename: comments.rss

View File

@@ -0,0 +1,43 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<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>
<hr />
<!--% FOREACH item IN DBI.query('
SELECT C.*,
H.host, H.hostid AS host_id,
E.title AS episode_title,
E.date AS episode_date,
E.duration AS episode_duration,
M.id AS series_id, M.name AS series_name
FROM comments AS C
INNER JOIN eps AS E
ON C.eps_id = E.id
INNER JOIN hosts AS H
ON E.hostid = H.hostid
INNER JOIN miniseries AS M
ON E.series = M.id
ORDER BY C.comment_timestamp DESC
LIMIT 30
')
%-->
<article>
<header>
<h1><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></h1>
<p><small>Posted at <!--% item.comment_timestamp %--> relating to the show <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html">hpr<!--% item.eps_id %--></a> which was released on <!--% item.episode_date %--> by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a> entitled <em><!--% item.episode_title %--></em></small>
</p>
</header>
<pre class="comment">
<!--% item.comment_text %-->
</pre>
<footer>
Listen in <a href="<!--% media_path(item.eps_id, 'hpr', 'ogg', baseurl, media_baseurl) %-->">ogg</a>, <a href="<!--% media_path(item.eps_id, 'hpr', 'spx', baseurl, media_baseurl) %-->">spx</a>, or <a href="<!--% media_path(item.eps_id, 'hpr', 'mp3', baseurl, media_baseurl) %-->">mp3</a> format.</p></footer>
</article>
<hr />
<!--% END %-->

View File

@@ -1,31 +1,18 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-correspondent-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% 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 = ?
')
%--> %-->
<!--% query_hpr_shows = DBI.prepare(' <!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC ')
%--> %-->
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %--> <!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
<!--% hpr_shows = query_hpr_shows.execute(id); %--> <!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% hpr_show_count = 0 %--> <!--% hpr_show_count = 0 %-->
<!--% FOREACH show IN hpr_shows_to_count %--> <!--% FOREACH show IN hpr_shows_to_count %-->
<!--% hpr_show_count = hpr_show_count +1; %--> <!--% hpr_show_count = hpr_show_count +1; %-->
@@ -33,8 +20,9 @@
<!--% query_twat_show_count = DBI.prepare(' <!--% query_twat_show_count = DBI.prepare('
SELECT id SELECT id
FROM twat_eps AS \'eps\' FROM twat_eps AS eps
WHERE eps.hostid = ? ') WHERE eps.hostid = ?
')
%--> %-->
<!--% query_twat_shows = DBI.prepare(' <!--% query_twat_shows = DBI.prepare('
SELECT SELECT
@@ -51,7 +39,7 @@
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 date DESC ORDER BY eps.id DESC
') ')
%--> %-->
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %--> <!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->

View File

@@ -4,7 +4,7 @@
<p>For more information on how to become a Correspondent see our <a href="<!--% absolute_path(baseurl) %-->contribute.html">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 /> <p>For more information on how to become a Correspondent see our <a href="<!--% absolute_path(baseurl) %-->contribute.html">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, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<table> <table class="hosts">
<th >Avatar</th> <th >Avatar</th>
<th >Name &amp; Host ID</th> <th >Name &amp; Host ID</th>
<th >license</th> <th >license</th>
@@ -16,7 +16,7 @@
inner join (select hostid, max(date) as date from eps group by hostid) as e inner join (select hostid, max(date) as date from eps group by hostid) as e
on h.hostid = e.hostid ' on h.hostid = e.hostid '
) %--> ) %-->
<tr height="80" bgcolor="#CCCCCC"> <tr height="80">
<td><img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(host.hostid) %-->" height="80" width="80" alt="avatar" /></td> <td><img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(host.hostid) %-->" height="80" width="80" alt="avatar" /></td>
<td><strong><!--% host.host %--></strong><br> <td><strong><!--% host.host %--></strong><br>

View File

@@ -2,57 +2,10 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %--> <!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare(' <!--% query_episodes = DBI.prepare(query_episode_maxmin)
WITH episode_maxmin AS (
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
FROM eps
WHERE eps.date < date (\'now\', \'+1 days\')
),
episode_date AS (
SELECT eps.date
FROM eps
WHERE eps.id = ?
),
episode_previous AS (
SELECT MAX(id) AS \'previous\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date < episode_date.date
WHERE eps.id > 1
),
episode_next AS (
SELECT MIN(id) AS \'next\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date > episode_date.date
WHERE eps.date < date (\'now\')
),
comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT eps.id, eps.date, eps.title, eps.duration,
eps.summary, eps.notes, eps.explicit, eps.license,
eps.tags, eps.version, eps.downloads, eps.valid,
episode_maxmin.latest, episode_maxmin.earliest,
episode_previous.previous, episode_next.next,
hosts.hostid, hosts.host,
miniseries.name AS \'series\', miniseries.id AS \'seriesid\',
miniseries.description AS \'series_description\',
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN episode_maxmin ON eps.id = episode_maxmin.id
INNER JOIN episode_previous ON eps.id = episode_previous.id
INNER JOIN episode_next ON eps.id = episode_next.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.id = ?
')
%--> %-->
<!--% episode_result = query_episodes.execute(id, id, id, id, id) %--> <!--% episode_result = query_episodes.execute(id, id, id, id, id) %-->
<!--% FOREACH episode IN episode_result %--> <!--% FOREACH episode IN episode_result %-->
@@ -75,7 +28,10 @@ Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pa
</header> </header>
<div><!--% episode.notes %--></div> <div><!--% episode.notes %--></div>
<footer> <footer>
<!--% listen_now(episode, "hpr", baseurl, media_hostname) %-->
<!--% show_transcript(episode, "hpr", baseurl, media_baseurl) %-->
<!--% listen_now(episode, "hpr", baseurl, media_baseurl) %-->
<p> <p>
<!--% episode_navigation %--> <!--% episode_navigation %-->
</p> </p>
@@ -84,10 +40,11 @@ Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pa
<hr /> <hr />
<h1>Comments</h1> <h1>Comments</h1>
<p id="comments"> <p id="comments">
Subscribe to the comments <a href="https://www.hackerpublicradio.org/comments_rss.php">RSS</a> feed. Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss">RSS</a> feed.
</p> </p>
<!--% query_comments = DBI.prepare(' <!--% query_comments = DBI.prepare('
SELECT SELECT
id,
comment_timestamp, comment_timestamp,
comment_author_name, comment_author_name,
comment_title, comment_title,
@@ -99,7 +56,7 @@ Subscribe to the comments <a href="https://www.hackerpublicradio.org/comments_rs
<!--% 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="1">Comment #<!--% comment_index %--> posted on <!--% comment.comment_timestamp %--> by <!--% comment.comment_author_name %--></h5> <h5 id="comment_<!--% comment.id %-->">Comment #<!--% comment_index %--> posted on <!--% comment.comment_timestamp %--> by <!--% comment.comment_author_name %--></h5>
<h4><!--% comment.comment_title %--></h4> <h4><!--% comment.comment_title %--></h4>
<!--% comment.comment_text %--> <!--% comment.comment_text %-->
<!--% comment_index = comment_index + 1 %--> <!--% comment_index = comment_index + 1 %-->
@@ -108,11 +65,11 @@ Subscribe to the comments <a href="https://www.hackerpublicradio.org/comments_rs
<h2>Leave Comment</h2> <h2>Leave Comment</h2>
<p> <p>
<strong>Note to Verbose Commenters</strong><br /> <strong>Note to Verbose Commenters</strong><br />
If you can't fit everything you want to say in the comment below then you really should <a href="/contribute.php">record</a> a response show instead. If you can't fit everything you want to say in the comment below then you really should <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> a response show instead.
</p> </p>
<p> <p>
<strong>Note to Spammers</strong><br /> <strong>Note to Spammers</strong><br />
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to <a href="/contribute.php">record</a> a show about yourself, or your industry, or any other topic we may find interesting. <em>We also check shows for spam :)</em>. All comments are moderated. All links are checked by humans. We strip out all html. Feel free to <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> a show about yourself, or your industry, or any other topic we may find interesting. <em>We also check shows for spam :)</em>.
</p> </p>
<form method="POST" action="comment_confirm.php"> <form method="POST" action="comment_confirm.php">
<fieldset> <fieldset>

View File

@@ -1,4 +1,5 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS "queries-episodes-${constants.database}.tpl.html" %-->
<article> <article>
<header> <header>
<h1>Complete Archive of Shows.</h1> <h1>Complete Archive of Shows.</h1>
@@ -7,21 +8,7 @@
</p> </p>
</header> </header>
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episodes IN DBI.query(' <!--% FOREACH episodes IN DBI.query(query_episodes)
SELECT
eps.id,
eps.explicit,
eps.date, eps.license, eps.title, eps.summary,
eps.duration, eps.notes, eps.tags,
hosts.hostid,
hosts.host, hosts.email, hosts.local_image,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
')
%--> %-->
<!--% show_summary(episodes) %--> <!--% show_summary(episodes) %-->
<!--% END %--> <!--% END %-->
@@ -42,7 +29,7 @@
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
ORDER BY date DESC ORDER BY eps.id DESC
') ')
%--> %-->
<!--% twat_show_summary(twat_episode) %--> <!--% twat_show_summary(twat_episode) %-->

View File

@@ -0,0 +1,2 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->

View File

@@ -1,6 +1,10 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %--> <!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS 'shared-call_for_shows.tpl.html' %-->
<!--% INCLUDE 'content-index-announcement.tpl.html' %-->
<!--% PROCESS "queries-index-${constants.database}.tpl.html" %-->
<hr> <hr>
<article> <article>
<header> <header>
@@ -8,20 +12,7 @@
</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(' <!--% FOREACH next_available_episode_result IN DBI.query(query_next_available_episode)
WITH next_id AS (SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
FROM eps
WHERE eps.date > date(\'now\')
)
SELECT
MIN (next_id.id_next) AS \'next_id\',
strftime(\'%Y\', MIN (last_date)) AS \'last_year\',
strftime(\'%d\', MIN (last_date)) AS \'last_day\',
strftime(\'%m\', MIN (last_date)) AS \'last_month\'
FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL
')
%--> %-->
<!--% USE date %--> <!--% USE date %-->
<!--% calc = date.calc %--> <!--% calc = date.calc %-->
@@ -30,6 +21,9 @@
<!--% USE date %--> <!--% USE date %-->
<!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %--> <!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %-->
<p>We started producing shows as <a href="<!--% absolute_path(baseurl) %-->eps/index.html#twat_episodes"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to HPR then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="https://www.hackerpublicradio.org/calendar.php">released</a> in <strong><!--% days_till_next_episode %--></strong> days.</p> <p>We started producing shows as <a href="<!--% absolute_path(baseurl) %-->eps/index.html#twat_episodes"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to HPR then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="https://www.hackerpublicradio.org/calendar.php">released</a> in <strong><!--% days_till_next_episode %--></strong> days.</p>
</article>
<!--% display_call_for_shows() %-->
<article>
<h4>Meet the team</h4> <h4>Meet the team</h4>
<p> <p>
<audio controls preload="none">"; <audio controls preload="none">";
@@ -41,33 +35,7 @@
<hr> <hr>
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<h1>Latest Shows</h1> <h1>Latest Shows</h1>
<!--% FOREACH latest_episodes IN DBI.query(' <!--% FOREACH latest_episodes IN DBI.query(query_latest_episodes)
WITH comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT
eps.id,
eps.explicit,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid,
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
LIMIT 10
')
%--> %-->
<hr> <hr>
<article> <article>
@@ -84,7 +52,9 @@
</header> </header>
<!--% latest_episodes.notes %--> <!--% latest_episodes.notes %-->
<footer> <footer>
<!--% listen_now(latest_episodes, "hpr", baseurl, media_hostname) %--> <!--% show_transcript(latest_episodes, "hpr", baseurl, media_baseurl) %-->
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
</footer> </footer>
</article> </article>
<!--% END %--> <!--% END %-->
@@ -93,22 +63,7 @@
<hr> <hr>
<h1>Previous five weeks</h1> <h1>Previous five weeks</h1>
</header> </header>
<!--% FOREACH last_5_weeks_episodes IN DBI.query(' <!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes)
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.title, eps.summary,
eps.duration, eps.notes, eps.tags,
hosts.hostid,
hosts.host, hosts.email, hosts.local_image,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
LIMIT 30 OFFSET 10
')
%--> %-->
<!--% show_summary(last_5_weeks_episodes) %--> <!--% show_summary(last_5_weeks_episodes) %-->
<!--% END %--> <!--% END %-->

View File

@@ -0,0 +1,189 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<p>In this article we will show you how to connect to the HPR Community Room on Mumble.</p>
<p>You can think of Mumble like visiting a hotel that has different meeting rooms. Some are locked to you, some only allow you access if you are registered, some you can join but only listen to. In most, like the HPR room, you can hear the other people in the room talking. If you talk they can also hear you. There is a chat section where text can be shared as well.</p>
<p>When using Mumble <strong><em>you should always use a microphone and headset</em></strong> positioned close to your mouth but slightly off to the side.</p>
<h2>Install the software</h2>
<p>The <a href="https://www.mumble.info/downloads/">Mumble website offers download and install instructions</a> for different operating systems.
</p>
<p>Once you have installed the client then connect to the <a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0">HPR Room on Mumble</a>.
<p>There is a first run wizard that will step you through the process of configuring Mumble the first time. This will open up a series of configuration options.</p>
<p>Press <strong>Next</strong> on the introduction.</p>
<p><img alt="intro screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/01-intro.png" ></p>
<p>The device selection page will allow you to select which audio to use. As this will be different for everyone we can't offer you much help here other than to say that the defaults are usually fine.</p>
<p>When you are done press <strong>Next</strong>.</p>
<p><img alt="device selection screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/02-device-selection.png" ></p>
<p>The device tuning page will allow you to fine tune the latency. Normally the defaults are usually fine.</p>
<p>When you are done press <strong>Next</strong>.</p>
<p><img alt="device tuning screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/03-device-tuning.png" ></p>
<p>The Volume Tuning page will allow you to set your audio levels. Normally the defaults are usually fine.</p>
<p>Then press <strong>Next</strong>.</p>
<p><img alt="volume tuning screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/04-volume.png" ></p>
<p>It is <strong>very important</strong> that you set <strong>Push to Talk (PTT)</strong>, as you will disturb the other people in the room if you select the other methods. It may seem to be working fine to you, but it <em>will</em> result in issues for the others.
</p>
<ul>
<li>Click "Push to Talk:"</li>
<li>Click in the area next to it and press the key you intend to use as the Push To Talk (PTT) Key</li>
</ul>
<p>Try and pick a key that you don't normally use or need. You may have to disable that key mapping in the operating system you are using.</p>
<p>Then press <strong>Next</strong>.</p>
<p><img alt="ptt screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/05-ptt.png" ></p>
<p>The Quality Settings page will allow you to adjust the bandwidth. Normally the defaults are usually fine.</p>
<p>It is <strong>very important</strong> that you <strong>Disable Text-To-Speech</strong>, as all notifications will be read back and will disturb the other people in the room. It may seem to be working fine to you, but it <em>will</em> result in issues for the others.</p>
<ul>
<li>Click "Disable Text-To-Speech and use sounds instead"</li>
</ul>
<p>Then press <strong>Next</strong>.</p>
<p><img alt="no tts screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/06-notts.png" ></p>
<p>The positional audio page will allow you to fine tune the latency. Normally the defaults are usually fine.</p>
<p>Just press <strong>Next</strong>.</p>
<p><img alt="positional audio screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/07-positional-audio.png" ></p>
<p>That's it the initial configuration is done.</p>
<p>Then press <strong>Finish</strong>.</p>
<p><img alt="stats screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/08-stats.png" ></p>
<p>You are expected to have a digital certificate when connecting to Mumble servers.</p>
<p>This screen will allow you to Automatically create one.</p>
<p>Just press <strong>Next</strong>.</p>
<p><img alt="cert screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/09-cert.png" ></p>
<p>That completes the first setup of Mumble.</p>
<p>Then press <strong>Finish</strong>.</p>
<p><img alt="finished screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/10-finished.png" ></p>
<hr>
<p>Now that you have the Mumble client set up we can now start the process of connecting to the <a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0">HPR Room on Mumble</a>.</p>
<p>If you opened Mumble by clicking the link above, then you may not see the following options, but we'll cover them here if at any time you need to add the HPR server again</p>
<p>Just open mumble and press <strong>Server - Connect</strong></p>
<p>Then press <strong>Add New...</strong>.</p>
<p><img alt="add new connection screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/20-add-new.png" ></p>
<p>You will need to enter the information for the HPR server:</p>
<ul>
<li>Address: <strong>chatter.skyehaven.net</strong></li>
<li>Port: 64738</li>
<li>Username: <strong><em>Your Username</em></strong></li>
<li>Label: chatter.skyehaven.net</li>
</ul>
<p>Think about your username a bit as if you register it on the server you will not be able to change it again.</p>
<p>Then press <strong>Next</strong>.</p>
<p><img alt="add new server screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/21-add-server.png" ></p>
<p>If you clicked the link to the <a href="mumble://chatter.skyehaven.net:64738/Hacker%20Public%20Radio?version=1.2.0">HPR Room on Mumble</a>, then you may be brought to the option to enter a username. Think about this a bit as if you register it on the server you will not be able to change it again.</p>
<p>Then press <strong>Next</strong>.</p>
<p><img alt="username screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/11-username.png" ></p>
<p>You will need to confirm the servers Certificate matches this:</p>
<p>
<pre>Digest (SHA-1): 09:22:05:88:D6:60:17:FD:39:8F:55:B0:F5:A0:45:DA:96:32:9C:23</pre>
</p>
<p>If it matches then press <strong>Yes</strong>.</p>
<p><img alt="accept cert screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/12-accept-cert.png" ></p>
<p>All going well you will be connected to the server. By default you will end up in the <strong>Root</strong> - think the lobby of an hotel !</p>
<p>You will see a lot of rooms with names of other podcasts that use the server.</p>
<p>Before connecting to any room it's good etiquette to make sure your audio is working correctly.</p>
<p>The room <strong>Audio Test</strong> will allow you to speak and the <strong>OpieTheRepeatherBot</strong> will record your speech and after 10 seconds will play it back for you.</p>
<p><em>Click and hold</em> on your username (<em>ken1</em> in this example) and <em>drag</em> yourself into the <strong>Audio Test</strong> room.</p>
<p><img alt="audio test screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/13-audio-test.png" ></p>
<p>You now know how to switch from room to room.</p>
<p>Try to say something. Remember to press the <strong>Push to talk (PTT)</strong>. Everyone forgets to do this but it will become second nature after a while.</p>
<p>A good test is to count to ten slowly.</p>
<p>When you are talking the server should change your icon from a green person to a <em>blue</em> one with <em>sound circles</em> around the head.</p>
<p><img alt="audio ping screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/14-audio-ping.png" ></p>
<p>The <strong>OpieTheRepeatherBot</strong> will create another client with the prefix <strong>Mimic-</strong> followed by your username.</p>
<p>In this example it is <em>Mimic-ken1</em>.</p>
<p>You should hear your audio back.</p>
<p><img alt="audio pong screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/15-audio-pong.png" ></p>
<p>If your audio is poor - as is often the case - then this gives you the opportunity to fix it before interrupting other people.</p>
<p>How you fix it will depend on the operating system that you are using and the exact nature of the problem.</p>
<p>A common problem is that the operating system uses the built in speaker and microphone from the laptop instead of your headset. A tip would be to press the <strong>Push to talk (PTT)</strong> button and tap the microphone of your head set lightly. If you don't hear the tapping then Mumble is probably getting the wrong microphone as input.</p>
<p>In the example below I clicked the Microphone icon in my taskbar and a application (<em>pavucontrol</em>) opened allowing me to set the correct microphone.</p>
<p><img alt="hpr room screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/22-pavucontrol-recording.png" ></p>
<p>While I was there I also checked to make sure that Mumble was playing audio to my headset.</p>
<p><img alt="hpr room screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/23-pavucontrol-playback.png" ></p>
<p>Satisfied that the audio is good, you can <em>click and drag</em> your icon to the <strong>HPR</strong> room.</p>
<p><img alt="hpr room screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/16-hpr-room.png" ></p>
<p>Some rooms require you to be registered to enter a room, to speak, to record, or to chat in the room.</p>
<p>To register first <em>Right Click</em> on your icon and a menu will open.</p>
<p>Press <strong>Register....</strong></p>
<p><img alt="register screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/17-register.png" ></p>
<p>Then press <strong>Yes</strong></p>
<p><img alt="register confirm screenshot" src="<!--% absolute_path(baseurl) %-->images/mumble-howto/18-register-confirm.png" ></p>
<p>That's it - you are now all set to use mumble.</p>

View File

@@ -1,28 +1,16 @@
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-series-${constants.database}.tpl.html" %-->
<article> <article>
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<h1 class="title">In-Depth Series</h1> <h1 class="title">In-Depth Series</h1>
<!--% FOREACH series IN DBI.query( <!--% FOREACH series IN DBI.query(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
GROUP BY series) AS ep ON ep.series = miniseries.id
ORDER BY name'
) %-->
<h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2> <h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
<ul> <ul>
<li>Number of episodes: <!--% series.number_of_episodes %--></li> <li>Number of episodes: <!--% series.number_of_episodes %--></li>
<li>Open/closed: <!--% display_choice(series.private, 'closed', 'open') %--></li> <li>Open/closed: <!--% display_choice(series.private, 'closed', 'open') %--></li>
<li>Date of earliest show: <!--% series.earliest_show %--></li> <li>Date of earliest show: <!--% series.earliest_show %--></li>
<li>Date of latest show: <!--% series.latest_show %--></li> <li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="hpr_ogg_rss.php?series=38">ogg</a>, <a href="hpr_spx_rss.php?series=38">spx</a>, <a href="hpr_mp3_rss.php?series=38">mp3</a></li> <li>Series RSS feeds: <a href="https://www.hackerpublicradio.org/hpr_ogg_rss.php?series=<!--% series.id %-->">ogg</a>, <a href="https://www.hackerpublicradio.org/hpr_spx_rss.php?series=<!--% series.id %-->">spx</a>, <a href="https://www.hackerpublicradio.org/hpr_mp3_rss.php?series=<!--% series.id %-->">mp3</a></li>
</ul> </ul>
<em><!--% series.description %--></em> <em><!--% series.description %--></em>
<!--% END %--> <!--% END %-->

View File

@@ -1,20 +1,8 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS "queries-series_episodes-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_series = DBI.prepare('SELECT miniseries.id, miniseries.name, <!--% query_series = DBI.prepare(query_series_sql)
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
GROUP BY series) AS ep ON ep.series = miniseries.id
WHERE miniseries.id = ?
ORDER BY name')
%--> %-->
<!--% series_result = query_series.execute(id) %--> <!--% series_result = query_series.execute(id) %-->
<article> <article>
@@ -25,21 +13,11 @@
<li>Open/closed: open</li> <li>Open/closed: open</li>
<li>Date of earliest show: <!--% series.earliest_show %--></li> <li>Date of earliest show: <!--% series.earliest_show %--></li>
<li>Date of latest show: <!--% series.latest_show %--></li> <li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="hpr_ogg_rss.php?series=79&full=1&gomax=1">ogg</a>, <a href="hpr_spx_rss.php?series=79&full=1&gomax=1">spx</a>, <a href="hpr_mp3_rss.php?series=79&full=1&gomax=1">mp3</a></li> <li>Series RSS feeds: <a href="https://www.hackerpublicradio.org/hpr_ogg_rss.php?series=<!--% series.id %-->&full=1&gomax=1">ogg</a>, <a href="https://www.hackerpublicradio.org/hpr_spx_rss.php?series=<!--% series.id %-->&full=1&gomax=1">spx</a>, <a href="https://www.hackerpublicradio.org/hpr_mp3_rss.php?series=<!--% series.id %-->&full=1&gomax=1">mp3</a></li>
</ul> </ul>
<div><em><!--% series.description %--></em></div> <div><em><!--% series.description %--></em></div>
<!--% END %--> <!--% END %-->
<!--% query_shows = DBI.prepare('SELECT <!--% query_shows = DBI.prepare(query_shows_sql)
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 = ?
ORDER BY date DESC
')
%--> %-->
<!--% show_results = query_shows.execute(id) %--> <!--% show_results = query_shows.execute(id) %-->
<!--% FOREACH show IN show_results %--> <!--% FOREACH show IN show_results %-->

View File

@@ -1,3 +1,51 @@
<h1>RSS Syndication</h1>
<p><small><em><a href="http://hackerpublicradio.org/advanced_rss_settings.php">Advanced Settings</a>.</em></small></p>
<article>
<header>
<h2>Subscribe to our Feeds</h2>
</header>
<p>
Great that you want to listen. Have a look below at the feeds that best suite your listening habits.
</p>
</article>
<article>
<header>
<h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> The Community News Summary</h2>
<h3>One show a month</h3>
</header>
<p>
If you get overwhelmend by the amount of shows we produce, then this is a good place to start.
</p>
<p>
Every month, the HPR Janitors put down their mops had have a chat about all the shows, and what else has been going on in the HPR community. This is a regular show scheduled for the first Monday of the month.
</p>
<ul>
<li><a href="https://hackerpublicradio.org/hpr_ogg_rss.php?series=47">ogg</a> Larger file size higher quality feed.</li>
<li><a href="https://hackerpublicradio.org/hpr_spx_rss.php?series=47">mp3</a> Larger file size regular quality feed in a common format.</li>
<li><a href="https://hackerpublicradio.org/hpr_mp3_rss.php?series=47">spx</a> Small file size lower quality feed. <br/>Ideal for dial-up/mobile connections.</li>
</ul>
<p>
We also maintain an <a href="https://archive.org/details/hackerpublicradio?and[]=subject%3A%22Community+News%22">Archive.org</a> page where you can get the shows in even more formats.
</p>
</article>
<article>
<header>
<h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> Two week Audio feed</h2>
<h3>5 shows a week</h3>
</header>
<p>
Use these feeds to keep up to date with the latest HPR Episodes.
</p>
<ul>
<li><a href="hpr_ogg_rss.php">ogg</a> Larger file size higher quality feed.</li>
<li><a href="hpr_rss.php">mp3</a> Larger file size regular quality feed in a common format.</li>
<li><a href="hpr_spx_rss.php">spx</a> Small file size lower quality feed. <br/>Ideal for dial-up/mobile connections.</li>
</ul>
<p>
We also maintain an <a href="https://archive.org/details/hackerpublicradio">Archive.org</a> page where you can get the shows in even more formats. For more recent shows we are now including the original upload as delivered.
</p>
</article>
<article> <article>
<header> <header>
<h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> Entire Archive Audio feed</h2> <h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> Entire Archive Audio feed</h2>
@@ -19,7 +67,7 @@
Use this feed to get the shows as they are posted. The shows will be posted out of order as they come in and may be replaced/reposted if errors are found. This is intended as a means to provide find issues with metadata or the audio quality of new shows before they hit the main feed. Use this feed to get the shows as they are posted. The shows will be posted out of order as they come in and may be replaced/reposted if errors are found. This is intended as a means to provide find issues with metadata or the audio quality of new shows before they hit the main feed.
</p> </p>
<ul> <ul>
<li><a href="rss-future.php">Shows as they are posted.</a> OGG Only</li> <li><a href="https://www.hackerpublicradio.org/rss-future.php">Shows as they are posted.</a> OGG Only</li>
</ul> </ul>
</article> </article>
<article> <article>
@@ -27,6 +75,27 @@
<h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> Comment feed</h2> <h2><img src="<!--% absolute_path(baseurl) %-->images/feed.png" alt="rss logo"> Comment feed</h2>
</header> </header>
<ul> <ul>
<li><a href="http://www.hackerpublicradio.org/comments_rss.php">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>
<article>
<header>
<h2>Site Replication Sources</h2>
</header>
<ul>
<li><a href="<!--% absolute_path(baseurl) %-->hpr.sql">Daily Database Dump in SQL Format</a></li>
<ul>
</article>
<article>
<header>
<h2>External Sources</h2>
</header>
<ul>
<li><a href="https://archive.org/details/hackerpublicradio">Archive.org</a></li>
<li><a href="https://itunes.apple.com/us/podcast/hacker-public-radio/id281699640?mt=2">iTunes</a></li>
<li><a href="https://podcasts.google.com/feed/aHR0cDovL2hhY2tlcnB1YmxpY3JhZGlvLm9yZy9ocHJfcnNzLnBocA">Google Podcasts</a></li>
<li><a href="https://player.fm/series/hacker-public-radio">PlayerFM</a></li>
<li><a href="https://open.spotify.com/show/7e2hYcnHj9vKgUzsIOf4r3">Spotify</a></li>
<li><a href="https://www.mixcloud.com/hackerpublicradio/">MixCloud</a></li>
<ul>
</article>

View File

@@ -7,7 +7,6 @@
WITH episode_maxmin AS ( WITH episode_maxmin AS (
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\' SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
FROM twat_eps AS eps FROM twat_eps AS eps
WHERE eps.date < date (\'now\', \'+1 days\')
), ),
episode_date AS ( episode_date AS (
SELECT eps.date SELECT eps.date
@@ -26,7 +25,6 @@
FROM twat_eps AS eps FROM twat_eps AS eps
INNER JOIN episode_date INNER JOIN episode_date
ON eps.date > episode_date.date ON eps.date > episode_date.date
WHERE eps.date < date (\'now\')
) )
SELECT eps.id, eps.date, eps.title, eps.duration, SELECT eps.id, eps.date, eps.title, eps.duration,
eps.summary, eps.notes, eps.explicit, eps.license, eps.summary, eps.notes, eps.explicit, eps.license,
@@ -58,14 +56,14 @@
<img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(episode.hostid) %-->" height="80" width="80" alt="" /></a><br><!--% END %--> <img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(episode.hostid) %-->" height="80" width="80" alt="" /></a><br><!--% END %-->
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) %--> <br> <!--% display_tags(episode.tags) %--> <br>
<!--% display_listen_in(episode.id) %--> <!--% display_listen_in(episode.id, "twat") %-->
</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>
<p><em><!--% episode.series_description %--></em></p> <p><em><!--% episode.series_description %--></em></p>
</header> </header>
<div><!--% episode.notes %--></div> <div><!--% episode.notes %--></div>
<footer> <footer>
<!--% listen_now(episode, "twat", baseurl, media_hostname) %--> <!--% listen_now(episode, "twat", baseurl, media_baseurl) %-->
<p> <p>
<!--% episode_navigation %--> <!--% episode_navigation %-->
</p> </p>

View File

@@ -1,8 +1,6 @@
<!--% PROCESS "queries-ids-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episode IN DBI.query( <!--% FOREACH episode IN DBI.query(query_ids_episode) %-->
'select eps.id from eps
where eps.date < date (\'now\', \'+1 days\') '
) %-->
,<!--% episode.id %--> ,<!--% episode.id %-->
<!--% END %--> <!--% END %-->

View File

@@ -1,7 +1,6 @@
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH episode IN DBI.query( <!--% FOREACH episode IN DBI.query(
'select eps.id from twat_eps AS \'eps\' 'select eps.id from twat_eps AS eps'
where eps.date < date (\'now\', \'+1 days\') '
) %--> ) %-->
,<!--% episode.id %--> ,<!--% episode.id %-->
<!--% END %--> <!--% END %-->

View File

@@ -5,7 +5,7 @@
<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_path(baseurl) %-->contribute.html">Give Shows</a></li> <li><a href="<!--% absolute_path(baseurl) %-->contribute.html">Give Shows</a></li>
<li><a href="<!--% absolute_path(baseurl) %-->help_out.html">Contribute</a></li> <li><a href="<!--% absolute_path(baseurl) %-->help_out.html">Contribute</a></li>
<li><a href="<!--% absolute_path(baseurl) %-->tags.html">Tags</a></li> <li><a href="http://www.hackerpublicradio.org/tags.php">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>
</ul> </ul>

View File

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

View File

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

View File

@@ -0,0 +1,18 @@
<!--% query_hpr_shows = '
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC
'
%-->

View File

@@ -0,0 +1,18 @@
<!--% query_hpr_shows = '
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
ORDER BY eps.id + 0 DESC
'
%-->

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 < DATE_ADD(NOW(), INTERVAL 1 DAY)
),
episode_date AS (
SELECT eps.date
FROM eps
WHERE eps.id = ?
),
episode_previous AS (
SELECT MAX(id) AS \'previous\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date < episode_date.date
WHERE eps.id > 1
),
episode_next AS (
SELECT MIN(id) AS \'next\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date > episode_date.date
WHERE eps.date < NOW()
),
comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT eps.id, eps.date, eps.title, eps.duration,
eps.summary, eps.notes, eps.explicit, eps.license,
eps.tags, eps.version, eps.downloads, eps.valid,
episode_maxmin.latest, episode_maxmin.earliest,
episode_previous.previous, episode_next.next,
hosts.hostid, hosts.host,
miniseries.name AS \'series\', miniseries.id AS \'seriesid\',
miniseries.description AS \'series_description\',
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN episode_maxmin ON eps.id = episode_maxmin.id
INNER JOIN episode_previous ON eps.id = episode_previous.id
INNER JOIN episode_next ON eps.id = episode_next.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.id = ?
'
%-->

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 < date(\'now\', \'+1 days\')
),
episode_date AS (
SELECT eps.date
FROM eps
WHERE eps.id = ?
),
episode_previous AS (
SELECT MAX(id) AS \'previous\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date < episode_date.date
WHERE eps.id > 1
),
episode_next AS (
SELECT MIN(id) AS \'next\', ? AS \'id\'
FROM eps
INNER JOIN episode_date
ON eps.date > episode_date.date
WHERE eps.date < date(\'now\')
),
comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT eps.id, eps.date, eps.title, eps.duration,
eps.summary, eps.notes, eps.explicit, eps.license,
eps.tags, eps.version, eps.downloads, eps.valid,
episode_maxmin.latest, episode_maxmin.earliest,
episode_previous.previous, episode_next.next,
hosts.hostid, hosts.host,
miniseries.name AS \'series\', miniseries.id AS \'seriesid\',
miniseries.description AS \'series_description\',
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
INNER JOIN episode_maxmin ON eps.id = episode_maxmin.id
INNER JOIN episode_previous ON eps.id = episode_previous.id
INNER JOIN episode_next ON eps.id = episode_next.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.id = ?
'
%-->

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 < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC'
%-->

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 < date(\'now\', \'+1 days\')
ORDER BY eps.id + 0 DESC'
%-->

View File

@@ -0,0 +1,4 @@
<!--% query_ids_episode = 'select eps.id from eps
where eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) '
%-->

View File

@@ -0,0 +1,4 @@
<!--% query_ids_episode = 'select eps.id from eps
where eps.date < date(\'now\', \'+1 days\')'
%-->

View File

@@ -0,0 +1,62 @@
<!--% query_next_available_episode = '
WITH next_id AS (
SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
FROM eps
WHERE eps.date > NOW()
)
SELECT
MIN(next_id.id_next) AS \'next_id\',
DATE_FORMAT(MIN(last_date), \'%Y\') AS \'last_year\',
DATE_FORMAT(MIN(last_date), \'%d\') AS \'last_day\',
DATE_FORMAT(MIN(last_date), \'%m\') AS \'last_month\'
FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL
'
%-->
<!--% query_latest_episodes = '
WITH comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT
eps.id,
eps.explicit,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid,
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC
LIMIT 10
'
%-->
<!--% query_last_5_weeks_episodes = '
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.title, eps.summary,
eps.duration, eps.notes, eps.tags,
hosts.hostid,
hosts.host, hosts.email, hosts.local_image,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC
LIMIT 30 OFFSET 10
'
%-->

View File

@@ -0,0 +1,62 @@
<!--% query_next_available_episode = '
WITH next_id AS (
SELECT id, id + 1 AS \'id_next\', date as \'last_date\'
FROM eps
WHERE eps.date > date(\'now\')
)
SELECT
MIN(next_id.id_next) AS \'next_id\',
strftime(\'%Y\', MIN (last_date)) AS \'last_year\',
strftime(\'%d\', MIN (last_date)) AS \'last_day\',
strftime(\'%m\', MIN (last_date)) AS \'last_month\'
FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL
'
%-->
<!--% query_latest_episodes = '
WITH comment_tallies AS (
SELECT
eps_id,
COUNT(eps_id) AS eps_tally
FROM comments
GROUP BY eps_id
)
SELECT
eps.id,
eps.explicit,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid,
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY eps.id + 0 DESC
LIMIT 10
'
%-->
<!--% query_last_5_weeks_episodes = '
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.title, eps.summary,
eps.duration, eps.notes, eps.tags,
hosts.hostid,
hosts.host, hosts.email, hosts.local_image,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY eps.id + 0 DESC
LIMIT 30 OFFSET 10
'
%-->

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,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(\'now\', \'+1 days\')
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,28 @@
<!--% 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(\'now\', \'+1 days\')
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(\'now\', \'+1 days\')
ORDER BY eps.id DESC
'
%-->

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
<!--% PROCESS 'shared-item.tpl.xml' %--> <!--% 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 %--> <!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, media_file_extension, audio_mime_type) %--> <!--% display_item(episode, media_file_extension, audio_mime_type) %-->
<!--% END %--> <!--% END %-->

View File

@@ -0,0 +1,23 @@
<!--% 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
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.date DESC
LIMIT 10
')
%-->
<!--% feed_result = query_hpr_feed.execute() %-->

View File

@@ -0,0 +1,22 @@
<!--% 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
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.date DESC
')
%-->
<!--% feed_result = query_hpr_feed.execute() %-->

View File

@@ -0,0 +1,18 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-call_for_shows-${constants.database}.tpl.html" %-->
<!--% MACRO display_call_for_shows BLOCK %-->
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows)
%-->
<!--% results_call_for_shows = result_call_for_shows.execute().get_all() %-->
<!--% IF results_call_for_shows.0.request_for_shows == 1 %-->
<!--% USE date %-->
<article>
<header>
<h3>Call for shows</h3>
</header>
<p><strong><em>We are running very low on shows</em></strong> at the moment. Have a look at the <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">hosts</a> page and if you don't see "<!--% date.format(date.now, '%Y') %-->-??-??" next to your name, or if your name is not listed, you might consider sending us in something.</p>
<!-- <img src="/images/hprstats.png" alt="hpr queue showing an graph showing how few shows we have" /> -->
<p>There are no files to process on the FTP server.</p>
</article>
<!--% END %-->
<!--% END %-->

View File

@@ -1,5 +1,9 @@
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% MACRO rss_show_series(series, series_id) IF series != "general" %-->
from the series <em><a href="<!--% baseurl %-->series/<!--% zero_pad_left(series_id) %-->.html"><!--% series %--></em></a>.
<!--% END %-->
<!--% MACRO show_series(series, series_id, label) IF series != "" %--> <!--% MACRO show_series(series, series_id, label) IF series != "" %-->
<!--% IF label == "" %--> <!--% IF label == "" %-->
<!--% label = "Series" %--> <!--% label = "Series" %-->
@@ -11,8 +15,15 @@
<span><label>Tags:</label> <em><!--% tags %--></em>.</span> <span><label>Tags:</label> <em><!--% tags %--></em>.</span>
<!--% END %--> <!--% END %-->
<!--% MACRO display_listen_in(eps_id) BLOCK %--> <!--% MACRO display_listen_in(eps_id, episode_type) BLOCK %-->
Listen in <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.ogg">ogg</a>, <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.spx">spx</a>, or <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.mp3">mp3</a> format. <!--% IF episode_type == "" %--><!--% episode_type = 'hpr' %--><!--% END %-->
Listen in
<!--% IF episode_type == 'hpr' %-->
<a href="<!--% media_path(eps_id, episode_type, 'ogg', baseurl, media_baseurl) %-->">ogg</a>,
<a href="<!--% media_path(eps_id, episode_type, 'spx', baseurl, media_baseurl) %-->">spx</a>,
or
<!--% END %-->
<a href="<!--% media_path(eps_id, episode_type, 'mp3', baseurl, media_baseurl) %-->">mp3</a> format.
<!--% END %--> <!--% END %-->
<!--% MACRO display_comments_tally(eps_id, tally) BLOCK %--> <!--% MACRO display_comments_tally(eps_id, tally) BLOCK %-->

View File

@@ -1,19 +1,16 @@
<!--% MACRO listen_now(episode, episode_type, baseurl, media_hostname) BLOCK %--> <!--% MACRO listen_now(episode, episode_type, baseurl, media_baseurl) BLOCK %-->
<!--% IF episode_type == "twat" %-->
<!--% media_folder = "eps" %--><!--% ELSE %--><!--% media_folder = "local" %-->
<!--% END %-->
<h2>Listen Now</h2> <h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p> <p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<audio controls preload="none"> <audio controls preload="none">
<source src="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg" type="audio/ogg" > <source src="<!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %-->" type="audio/ogg" >
<source src="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3" type="audio/mpeg" > <source src="<!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %-->" type="audio/mpeg" >
</audio> </audio>
<ul> <ul>
<!--% IF episode_type != "twat" %--> <!--% IF episode_type != "twat" %-->
<li>ogg: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg</a></li> <li>ogg: <a href="<!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %--></a></li>
<li>spx: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.spx"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.spx</a></li> <li>spx: <a href="<!--% media_path(episode.id, episode_type, 'spx', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'spx', baseurl, media_baseurl) %--></a></li>
<!--% END %--> <!--% END %-->
<li>mp3: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3</a></li> <li>mp3: <a href="<!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %--></a></li>
</ul> </ul>
<!--% END %--> <!--% END %-->

View File

@@ -0,0 +1,12 @@
<!--% MACRO show_transcript(episode, episode_type, baseurl, media_baseurl) BLOCK %-->
<h2>Show Transcript</h2>
<p>Automatically generated using <a href="https://github.com/openai/whisper">whisper</a>
<pre><code>whisper --model tiny --language en hpr<!--% zero_pad_left(episode.id) %-->.wav</code></pre></p>
<ul>
<li>Text: <a href="<!--% media_path(episode.id, episode_type, 'txt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.txt</a></li>
<li><a href="https://en.wikipedia.org/wiki/WebVTT">WebVTT</a>: <a href="<!--% media_path(episode.id, episode_type, 'vtt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.vtt</a></li>
<li><a href="https://en.wikipedia.org/wiki/SubRip">SubRip</a>: <a href="<!--% media_path(episode.id, episode_type, 'srt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.srt</a></li>
</ul>
<!--% END %-->

View File

@@ -1,6 +1,11 @@
<!--% MACRO zero_pad_left(word) BLOCK %--> <!--% MACRO zero_pad_left(word, pad_length) BLOCK %-->
<!--% USE String(word) %--> <!--% IF pad_length %-->
<!--% String.format("%04s") %--> <!--% zero_pad_format = "%0${pad_length}s" %-->
<!--% ELSE %-->
<!--% zero_pad_format = "%04s" %-->
<!--% END %-->
<!--% USE String(word) %-->
<!--% String.format(zero_pad_format) %-->
<!--% END %--> <!--% END %-->
<!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %--> <!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %-->
@@ -31,7 +36,7 @@
<!--% END %--> <!--% END %-->
<!--% MACRO format_feed_date(date_to_format) BLOCK %--> <!--% MACRO format_feed_date(date_to_format) BLOCK %-->
<!--% USE feed_date = date(format = '%a, %e %b %Y 00:00:00 +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) %-->
<!--% END %--> <!--% END %-->
@@ -39,15 +44,36 @@
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->
<!--% MACRO media_baseurl(baseurl, media_hostname) BLOCK %--> <!--% MACRO media_basepath(baseurl, media_baseurl) BLOCK %-->
<!--% IF media_hostname %--> <!--% IF media_baseurl %-->
https://<!--% media_hostname %-->/<!--% ELSE %--> <!--% media_baseurl %--><!--% ELSE %-->
<!--% baseurl %--><!--% END %--> <!--% IF baseurl %--><!--% baseurl %--><!--% ELSE %-->/<!--% END %-->
<!--% END %-->
<!--% END %-->
<!--% MACRO media_path(episode_id, episode_type, media_type, baseurl, media_baseurl) BLOCK %-->
<!--% IF episode_type == "twat" %-->
<!--% padding = 3 %-->
<!--% media_folder = "eps/"; padding = 3 %-->
<!--% ELSE %-->
<!--% media_folder = "local/" %-->
<!--% END %-->
<!--% IF media_baseurl %-->
<!--% transcription_types = "txt srt vtt" %-->
<!--% USE String(transcription_types) %-->
<!--% USE String(media_baseurl) %-->
<!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %-->
<!--% media_baseurl = "${media_baseurl}hpr\$eps_id/" %-->
<!--% END %-->
<!--% media_folder = "" %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->
<!--% END %-->
<!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %-->
<!--% END %--> <!--% END %-->
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %--> <!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
<!--% IF folder == "" %--> <!--% IF folder %-->
<!--% folder = hpr %--> <!--% folder = folder %--><!--% ELSE %--><!--% folder = "hpr" %-->
<!--% END %--> <!--% END %-->
<small><a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>, <small><a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>,
<!--% IF links.previous %--> <!--% IF links.previous %-->