From ccba560ee34a4fd7531e76b578b53e449dcaf5ff Mon Sep 17 00:00:00 2001 From: Dave Morriss Date: Thu, 23 May 2024 20:14:42 +0100 Subject: [PATCH 1/4] Setting up static RSS feeds site-generator: Changed the routine used to generate entities in 'HTML::Entities'; see filter function 'xml_entity' site.cfg: Added root variable 'http_baseurl' which defines the base URL using 'http' templates/rss.tpl.xml: RSS template defining the channel and inserting the 'item' definitions; adjusted to be in step with the PHP version. templates/shared-item.tpl.xml: RSS template used for each 'item' in an RSS feed; contains a call to 'HTML::Strip' which turns off the addition of spaces when removing tags; adjusted to be in step with the PHP version. templates/shared-utils.tpl.html: Macro collection used by other templates; addition of temporay macro 'display_explicit_feed_2' which generates 'Yes/No' strings to be in step with the PHP version. --- site-generator | 25 +++++++++++++++---------- site.cfg | 1 + templates/rss.tpl.xml | 12 ++++++------ templates/shared-item.tpl.xml | 15 ++++++++------- templates/shared-utils.tpl.html | 4 ++++ 5 files changed, 34 insertions(+), 23 deletions(-) diff --git a/site-generator b/site-generator index dfdf1f8..80fce08 100755 --- a/site-generator +++ b/site-generator @@ -67,18 +67,21 @@ Perl Template Toolkit. - GRANT EXECUTE ON `hpr_hpr`.* TO 'hpr-generator'@'localhost'; Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.) - * GetOpt - * Pod::Usage * Config::Std - * Template - * Template::Plugin::File - * Template::Plugin::DBI - * Template::Plugin::HTML::Strip - * DBI - * Tie::DBI * DBD::SQLite or DBD:mysql + * DBI + * Data::Dumper * 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 + * Tie::DBI =head1 AUTHOR @@ -115,7 +118,8 @@ use Getopt::Long qw(:config auto_help); use Pod::Usage; use Config::Std; 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 DBI; use DBD::SQLite; @@ -425,7 +429,8 @@ sub parse_csv { sub xml_entity { my ($text) = @_; - encode_entities_numeric( $text ); +# encode_entities_numeric( $text ); + encode_entities( $text ); return $text; } diff --git a/site.cfg b/site.cfg index 0c7aea7..4a4e280 100644 --- a/site.cfg +++ b/site.cfg @@ -29,6 +29,7 @@ content: page.tpl.html #baseurl: OPTIONAL [i.e. file://] #baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/ baseurl: https://hackerpublicradio.org/ +http_baseurl: http://hackerpublicradio.org/ hub_baseurl: https://hub.hackerpublicradio.org/ media_baseurl: https://archive.org/download/hpr$eps_id/ generator_name: The HPR Robot diff --git a/templates/rss.tpl.xml b/templates/rss.tpl.xml index d13d3d1..f08df3b 100644 --- a/templates/rss.tpl.xml +++ b/templates/rss.tpl.xml @@ -2,8 +2,8 @@ Hacker Public Radio @@ -17,7 +17,7 @@ - + yes Hacker Public Radio Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom @@ -30,7 +30,7 @@ admin@hackerpublicradio.org (HPR Volunteer) site-generator - https://www.rssboard.org/rss-specification + http://www.rssboard.org/rss-specification 43200 Saturday @@ -47,9 +47,9 @@ HPR Volunteer 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. admin@hackerpublicradio.org - + - + diff --git a/templates/shared-item.tpl.xml b/templates/shared-item.tpl.xml index 309baf8..71dbdeb 100644 --- a/templates/shared-item.tpl.xml +++ b/templates/shared-item.tpl.xml @@ -1,24 +1,25 @@ - + - - HPR<!--% zero_pad_left(episode.id) %-->: <!--% episode.title %--> + + HPR<!--% zero_pad_left(episode.id) %-->: <!--% episode.title | html_strip | xml_entity %--> () () () - + eps/hpr/index.html ]]> ]]> - - eps/hpr. - + + eps/hpr. + + diff --git a/templates/shared-utils.tpl.html b/templates/shared-utils.tpl.html index b2572ae..6416911 100644 --- a/templates/shared-utils.tpl.html +++ b/templates/shared-utils.tpl.html @@ -35,6 +35,10 @@ + + + + From 41979786eb0fcbe83d4f003366d15e8dd3242954 Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Tue, 28 May 2024 20:28:21 +0200 Subject: [PATCH 2/4] 2024-05-28_18-28-21Z_Tuesday fixed ttl to 12h --- templates/rss.tpl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/rss.tpl.xml b/templates/rss.tpl.xml index f08df3b..123b3ad 100644 --- a/templates/rss.tpl.xml +++ b/templates/rss.tpl.xml @@ -31,7 +31,7 @@ admin@hackerpublicradio.org (HPR Volunteer) site-generator http://www.rssboard.org/rss-specification - 43200 + 720 Saturday Sunday From 392f9ba9e5e44d3acf65881264088c3ed83156cb Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Thu, 30 May 2024 17:08:16 +0200 Subject: [PATCH 3/4] 2024-05-30_15-08-16Z_Thursday Corrected Today With a Techie references --- templates/content-about.tpl.html | 2 +- templates/content-episodes.tpl.html | 2 +- templates/page.tpl.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/content-about.tpl.html b/templates/content-about.tpl.html index 8a9a6b0..5ee6458 100644 --- a/templates/content-about.tpl.html +++ b/templates/content-about.tpl.html @@ -40,7 +40,7 @@

Hacker Public Radio (HPR) is an Internet Radio show (podcast) that releases shows every weekday Monday through Friday. HPR has a long lineage going back to Radio FreeK America, Binary Revolution Radio & Infonomicon, - and it is a direct continuation of Twatech radio. + and it is a rename of Today With a Techie radio. Please listen to StankDawg's " Introduction to HPR" for more information.

diff --git a/templates/content-episodes.tpl.html b/templates/content-episodes.tpl.html index 6010185..26f0330 100644 --- a/templates/content-episodes.tpl.html +++ b/templates/content-episodes.tpl.html @@ -17,7 +17,7 @@

Creative Commons License
The following work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

-

T.W.A.T. Radio was brought to you by The Infonomicon Computer Club

+

Today With a Techie Radio was brought to you by The Infonomicon Computer Club

comments.rss">Listener contributed comments to the episodes +
+

Other Download Options