Commit Graph

446 Commits

Author SHA1 Message Date
Dave Morriss
dab80f1772 Using even more complex CTE query for testing 2023-10-16 23:01:30 +01:00
Dave Morriss
3ccd6101ee Removed unnecessary computations from query_next_available_episode 2023-10-12 19:36:03 +01:00
Dave Morriss
51d328203b Merge pull request 'Fixing days to next free slot' (#174) from fix_next_available_episode into main
Reviewed-on: rho_n/hpr_generator#174
2023-10-10 19:43:45 +00:00
Dave Morriss
366729a827 Fixing days to next free slot
templates/queries-index-mysql.tpl.html,
templates/queries-index-sqlite.tpl.html: Enhanced the query that finds
    the next free slot (query_next_available_episode). Also made it
    compute the days to the slot from the current day. The query returns
    data for calling Date::Calc to compute the number of days, but this
    calculation is no longer necessary. Next release will remove this.

templates/content-index.tpl.html: The number of days to the next free
    slot is reported here. The original Date::Calc computation which did
    this is no longer needed and has been removed since the query
    (query_next_available_episode) does it.
2023-10-10 17:55:44 +01:00
Dave Morriss
faac8c202e Updated README.md 2023-10-06 15:47:09 +01:00
Ken Fallon
3cf2f3a8e1 Merge pull request 'Making good an oversight in the IA_link PR' (#171) from IA_link_fix into main
Reviewed-on: rho_n/hpr_generator#171
2023-09-29 11:24:00 +00:00
Dave Morriss
83bb04f25c Making good an oversight in the IA_link PR 2023-09-29 10:56:56 +01:00
Ken Fallon
383ef45bb7 Merge pull request 'Added a link to the IA copy of the show' (#170) from IA_link into main
Reviewed-on: rho_n/hpr_generator#170
2023-09-29 08:15:21 +00:00
Dave Morriss
68c5e91552 Added a link to the IA copy of the show
site-generator: removed a subroutine prototype

templates/content-episode.tpl.html: added a new IA show link
2023-09-28 23:16:04 +01:00
Dave Morriss
35fa97e120 Cleaning up after bad merge 2023-09-09 23:26:15 +01:00
Dave Morriss
47a7493ef2 Merge branch '167_Several_templates_use_non-existent_absolute_url'
Somehow stuff got deleted - no idea why!
2023-09-09 23:10:07 +01:00
Dave Morriss
b4448caf16 Fixing 'absolute_url'
site-generator:

    Added all the modules that the script and the templates use to make
    it explicit what is required.

templates/shared-utils.tpl.html:

    Added a new TT² macro called 'absolute_url' which takes two
    arguments, the base and  the path or relative URL. It's fairly
    primitive but seems to work.

templates/content-about.tpl.html,
templates/content-recording.tpl.html,
templates/content-request_a_slot.tpl.html,
templates/content-requested_topics.tpl.html,
templates/page.tpl.html:

    All calls to 'absolute_url' changed to use two arguments, and the
    link definitions adjusted to match this change.
2023-09-09 17:54:19 +01:00
Dave Morriss
8e6c44c46c Merge branch 'main' of https://repo.anhonesthost.net/rho_n/hpr_generator 2023-09-06 18:51:56 +01:00
Dave Morriss
aba463099c Merge branch 'I162_Fix_broken_links_in_template_files' 2023-09-06 18:50:19 +01:00
Dave Morriss
3396413321 Merge pull request 'I162_Fix_broken_links_in_template_files' (#166) from I162_Fix_broken_links_in_template_files into main
Reviewed-on: rho_n/hpr_generator#166
2023-09-06 17:43:42 +00:00
d1832ae619 Changes recommended by Dave - missing php and typo 2023-09-06 19:35:22 +02:00
4c239f4f67 Cleaned up the temp cruft 2023-09-05 20:39:25 +02:00
796ee598e9 Added press information that was missing and updated the FAQ for wikipedia 2023-09-05 20:31:46 +02:00
4b2a030a5b Missed a reference to <!--% baseurl %--> 2023-09-03 18:02:09 +02:00
7009533e25 Fixing invalid links in the templates. 2023-09-03 17:51:03 +02:00
Dave Morriss
5a73e94cf7 Merge branch 'norrist-main'
Amendment from 'norrist' received with thanks.
2023-08-28 12:53:57 +01:00
norrist
99a54d5543 Add libtemplate-plugin-html-strip-perl to getting started
Corresponding commit for my automated build
14d3217274
2023-08-28 11:41:44 +00:00
Ken Fallon
f87199bd92 Merge pull request 'Fixed miscalculation triggering 'Call for shows'' (#161) from I160_Call_for_shows_section_shown_inappropriately into main
Reviewed-on: rho_n/hpr_generator#161
2023-08-27 15:44:13 +00:00
Dave Morriss
ccc1982c6c Fixed miscalculation triggering 'Call for shows'
templates/shared-call_for_shows.tpl.html:
    - Cosmetic change

templates/queries-call_for_shows-mysql.tpl.html:
templates/queries-call_for_shows-sqlite.tpl.html:
    - In a period of 10 days the minimum number of weekday-only shows
      is 6, not 7. Adjusted the queries appropriately.
2023-08-27 16:00:00 +01:00
Ken Fallon
d9392bad6c Merge pull request 'Fixing Unicode problems' (#159) from I158_Problems_with_Unicode_in_the_site-generator into main
Reviewed-on: rho_n/hpr_generator#159
2023-08-27 13:42:33 +00:00
Dave Morriss
d519936f98 Fixing Unicode problems
site-generator:
    - Modification to the POD documentation
    - Addition of 'use 5.012' which enables various later Perl features
    - Addition of "use open ':encoding(UTF-8)'" which forces 'utf8' for
      all IO
    - Addition of 'use Template::Plugin::HTML::Strip' for consistency
    - Removal of other methods of making the default 'utf8' for IO
    - Removal of "'ENCODING => 'utf8'" when setting up a new template
      object. This allows template files to contain Unicode, but doesn't
      seem to be necessary
    - Changes to subroutine 'parse_csv': more comments, clarification of
      warning message, explicit conversion of tags which are marked as
      'utf8' to this format using 'utf8::encode' from core Perl.
2023-08-27 13:22:11 +01:00
Ken Fallon
f1480d742f Merge pull request 'Add new perl modules to getting-started' (#156) from norrist/hpr_generator:main into main
Reviewed-on: rho_n/hpr_generator#156
2023-08-21 18:24:36 +00:00
norrist
7d1968c60b Add new perl modules to getting-started 2023-08-21 14:56:14 +00:00
Ken Fallon
c263646cf2 Merge pull request 'Fixing issue #140' (#155) from I140_Convert_the_RSS_feeds_from_php_to_the_static_site into main
Reviewed-on: rho_n/hpr_generator#155
2023-08-20 15:07:33 +00:00
Dave Morriss
dc138596ea Fixing issue #140
site-generator:

    Cosmetic adjustments. Additions to the POD documentation.
    Additions to module list.
    Additions to work better with UTF-8.
    Addition of functions 'parse_csv' and 'xml_entity'

templates/queries-episodes-sqlite.tpl.html:
templates/shared-utils.tpl.html:

    Cosmetic changes

templates/rss-query-hpr-mysql.tpl.xml:
templates/rss-query-hpr-sqlite.tpl.xml:
templates/rss-query-hpr_total-mysql.tpl.xml:
templates/rss-query-hpr_total-sqlite.tpl.xml:

    Enhancements to allow the query to collect the audio length from the
    'assets' table. The audio file extension is passed as an argument to
    the 'execute' statement.

templates/rss.tpl.xml:

    Cosmetic changes
    Changed one 'php' URL to 'html'.

templates/shared-episode-summary.tpl.html:

    Change to 'display_tags' macro to turn the 'eps.tags' field into
    a list of links. This works, but needs further development because
    using the tag strings as anchor ids is not reliable.

templates/shared-item.tpl.xml:

    Cosmetic changes.
    Addition of filter 'HTML.strip' which is used as a means of removing
    HTML tags from '<itunes:summary>' strings.
    Using new filter 'xml_entity' which converts all non-ASCII
    characters in the notes to numeric hexadecimal entities for
    '<itunes:summary>'.
    The '<enclosure>' tag now uses 'episode.length' rather than
    'episode.duration' which has been extracted from the 'assets' table.
2023-08-19 13:34:50 +01:00
Dave Morriss
8e1788147c Merge pull request 'Fixed the link to the mail list' (#151) from 2023-08-06-ken-fixes into main
Reviewed-on: rho_n/hpr_generator#151
2023-08-06 13:22:13 +00:00
0b841ba78f Fixed the link to the mail list
- added redirect via hpr_hub .htaccess file
- added links to mastodon, matrix, and mumble

Removed contact and stuff you need to know pages as these are now in the about page
2023-08-06 14:04:00 +02:00
Ken Fallon
7b6788731b Merge pull request 'Fixes to "step navigation", etc' (#149) from I148_The_lower_"step_navigation"_line_is_smaller_than_the_upper_one into main
Reviewed-on: rho_n/hpr_generator#149
2023-08-01 09:47:31 +00:00
Dave Morriss
31fed34212 Fixes to "step navigation", etc
public_html/css/hpr.css: Commented out the 'font-size: 75%;' in the CSS
    definition for '#maincontent footer p'. It was this that shrank the
    lower "step navigation" list in comparison to the upper one. The
    upper is in a '<header>' block and the lower in a '<footer>' block.

templates/content-episode.tpl.html: Fixed a typo.

templates/content-theme.tpl.html: Changed "This can be added" to "This
    is automatically added"

templates/queries-episode-sqlite.tpl.html: Fixed a transcription error
    from the 'mysql' version

templates/shared-utils.tpl.html: Modified the layout of the
    'step_navigation' macro to remove tabs which are being copied to the
    HTML. Just a minor cosmetic issue. Added a Vim modeline to the file
    to help with this.
2023-07-31 15:27:17 +01:00
Ken Fallon
d7d94b1ba7 Merge pull request 'I145 Various bug fixes' (#146) from I145_Various_bug_fixes into main
Reviewed-on: rho_n/hpr_generator#146
2023-07-23 18:45:38 +00:00
Dave Morriss
3f766544ac I145 Various bug fixes
site-generator: fixed an error in the POD documentation and added an
    example. Reformatted 'GetOptions' arguments. Fixed 'parse_page_arg'
    which started its returned array with an empty arrayref. Fixed code
    using this array which skipped this unwanted extra value. Fixed
    'get_ids_from_db' which turns a CSV list of shows into an array, but
    includes a blank element. Removed a few trailing spaces.

templates/content-correspondents.tpl.html: Capitalised "License". Added
    'order by h.host' to the internal query to get hosts sorted
    alphabetically.

templates/content-episode.tpl.html: Added a call to macro
    'zero_pad_left' to add leading zeroes to show number in the title.
    Added a call to 'FILTER html_para' when displaying comments (which
    are plain text). Added a test for whether the show being displayed
    is in the 20-show window before the current one to determine whether
    the short or long comment form is required. Added the code to
    generate the two form types depending on the earlier test.

templates/content-sitemap.tpl.html: Corrected the entry for "Show
    Comments" which contained an invalid URL.

templates/page.tpl.html: Grammar corrections in the '<head>' section.

templates/queries-episode-mysql.tpl.html: Adjusted the date tests in the
    CTE's which compare the episode date with today's date plus one day.
    Why add a day when the test is whether the episode date is less than
    or equal to the current one? Also, it seemed that MySQL/MariaDB
    might need to work with the UTC date rather than the local dat
    implied by 'NOW()'.

templates/queries-episode-sqlite.tpl.html: Similar adjustment to date
    tests in CTE's to the MySQL version. SQLite defaults to UTC however.

templates/queries-episodes-mysql.tpl.html: See above for notes about
    date tests and MySQL UTC dates. Same arguments here.

templates/queries-episodes-sqlite.tpl.html: Date test adjustment
    described above.

templates/queries-ids-episode-mysql.tpl.html: Removed the date test from
    the query so all episode numbers are returned. Added an 'order by'
    since the table can (could in the past) return numbers out of
    numerical sequence.

templates/queries-ids-episode-sqlite.tpl.html: Same change as for the
    MySQL version.

templates/queries-index-mysql.tpl.html: There are three queries here,
    returned as TT² variables. The one called 'query_latest_episodes'
    has been adjusted to use UTC and to avoid adding a day to the
    current date. The query called 'query_last_5_weeks_episodes' has
    been similarly adjusted.

templates/queries-index-sqlite.tpl.html: Changes for the same two
    queries, but just for the tests requiring today's date plus one day.

templates/rss-comments.tpl.xml: Grammar corrections in the
    '<channel><description>' section.

templates/rss.tpl.xml: Grammar corrections in various subsections of the
    '<channel>' section.

templates/shared-call_for_shows.tpl.html: Removed the "FTP server"
    message. Slight tidying.
2023-07-23 17:03:27 +01:00
Ken Fallon
fb2b3ec6db Merge pull request 'Various changes to bring all the information pages into the same locations' (#137) from I136_Editorial_changes_mainly_on_the_About_page into main
Reviewed-on: rho_n/hpr_generator#137
2023-06-27 17:34:27 +00:00
6a3dae3d95 Various changes to bring all the information pages into the same locations 2023-06-27 19:31:39 +02:00
Ken Fallon
8176492dbe Merge pull request 'Fix the DuckDuck Go form, convert all url's to https and add help text' (#134) from I133_Duck_Duck_Go_search_not_working into main
Reviewed-on: rho_n/hpr_generator#134
2023-06-27 17:24:38 +00:00
278867cb4f Fix the DuckDuck Go form, convert all url's to https and add help text 2023-06-22 21:13:25 +02:00
Ken Fallon
0229b913db Merge pull request 'I118 Changes to get the site working' (#125) from I118_Changes_necessary_to_complete_the_migration_to_live into main
Reviewed-on: rho_n/hpr_generator#125
2023-06-22 16:48:45 +00:00
726ac57989 Changes to get the site working 2023-06-17 22:04:35 +02:00
Ken Fallon
62c7323847 Merge pull request 'Add information to each page showing when it was generated and by whom.' (#115) from FR_Add_information_to_show_when_the_site_page_was_last_updated into main
Reviewed-on: rho_n/hpr_generator#115
2023-06-15 17:41:54 +00:00
4f35673a3d Add information to each page showing when it was generated and by whom. 2023-06-08 15:37:04 +02:00
Roan Horning
10236d5705 Merge pull request 'Skip padding when id is empty string' (#114) from I110_Error-Argument-isnt-numeric into main
Reviewed-on: rho_n/hpr_generator#114
2023-06-05 02:52:37 +00:00
33d98904e2
Skip padding when id is empty string 2023-06-04 22:40:55 -04:00
Ken Fallon
de58d9dc61 Merge pull request 'I112_Add_support_for_a_different_php_basename' (#113) from I112_Add_support_for_a_different_php_basename into main
Reviewed-on: rho_n/hpr_generator#113
2023-06-01 16:04:23 +00:00
c9510516f1 Change php_baseurl to hub_baseurl in the template files 2023-05-31 10:25:17 +02:00
d828cdbce8 Rename php_baseurl to hub_baseurl 2023-05-30 20:48:32 +02:00
6211b9a033 Change dynamic site name to hub.hackerpublicradio.com 2023-05-30 20:10:08 +02:00