From 960c5acc831f98ca595e069270ffe160261366a8 Mon Sep 17 00:00:00 2001 From: Dave Morriss Date: Wed, 16 Apr 2025 17:14:26 +0100 Subject: [PATCH] Updates and a bug fix for make_shownotes Community_News/.make_shownotes.cfg: more comments Community_News/make_email: added colour test for pod2usage Community_News/make_shownotes: fixed a bug when using -lastrecording=DATETIME. Added reporting of expanded output file names; tidying and updates to POD documentation. Community_News/recording_dates.dat: added test entry for May 2025 --- Community_News/.make_shownotes.cfg | 8 ++- Community_News/make_email | 61 ++++++++++++++++-- Community_News/make_shownotes | 100 +++++++++++++++++------------ Community_News/recording_dates.dat | 1 + 4 files changed, 119 insertions(+), 51 deletions(-) diff --git a/Community_News/.make_shownotes.cfg b/Community_News/.make_shownotes.cfg index 1f7769e..db89509 100644 --- a/Community_News/.make_shownotes.cfg +++ b/Community_News/.make_shownotes.cfg @@ -1,10 +1,12 @@ # -# .make_shownotes.cfg (2025-03-27) +# .make_shownotes.cfg (2025-04-13) # Configuration file for make_shownotes version >= 4 # + # Format strings (using 'printf' formatting) for building certain required strings title_template = HPR Community News for %s %s summary_template = HPR Volunteers talk about shows released and comments posted in %s %s + # Repeat the following line with each of the desired tags to make an # array-like structure tags = Community News @@ -27,8 +29,8 @@ # cache of previous recording dates and times cache = recording_dates.dat - # Templates - # --------- + # Template Toolkit templates + # -------------------------- # Main note template (actually a soft link) main_template = shownote_template.tpl diff --git a/Community_News/make_email b/Community_News/make_email index d8c175c..b369244 100755 --- a/Community_News/make_email +++ b/Community_News/make_email @@ -47,7 +47,8 @@ use open ':std', ':encoding(UTF-8)'; # Make all IO UTF-8 use Cwd qw( abs_path ); use Getopt::Long; -use Pod::Usage; +BEGIN { $ENV{PERLDOC} = '-MPod::Text::Color'; } +use Pod::Usage qw(pod2usage); # Use colour-capable Pod::Text use Config::General; @@ -98,7 +99,7 @@ chdir($basedir); # DateTime::TimeZone->all_names(). Just uncomment the desired elements. # my @zones = ( - #{{{ + #{{{ --- time zones --- #'Africa/Abidjan', #'Africa/Accra', #'Africa/Addis_Ababa', @@ -1646,6 +1647,8 @@ The number of the show found in the database. =head1 DESCRIPTION +=head2 B + The script makes an invitation email for the next Community News recording with times per timezone. The message is structured by a Template Toolkit template, so its contents can be adjusted without changing this script. @@ -1666,6 +1669,44 @@ to use it with an email client to construct the message to be sent to the HPR mailing list, usually on the Monday prior to the weekend of the recording. The script does not send the message itself. +=head2 B + +The B script requires the presence of two files, which are +described in this section. These files are expected to be located in the same +directory used to store the script. + +The script also requires a configuration file which is described in the +B section below: + +=over 4 + +=item B + +This is a file containing the recording dates of previous Community News +shows. The file is managed by B, and it exists to aid the script +B when it is generating the HTML notes for distribution to the +volunteers who are contributing to the recording. + +When B is generating notes for the volunteers it tries to work +out whether any comments were missed for that month, or whether any for the +current review month were read. It highlights any such cases to assist with +continuity. The date and time of the last recording are needed to achieve +this. + +The file name is defined in the configuration file, and the default is +B. + +The format of the file is described in the B part of the +B section below. + +=item B