1 Community News
Dave Morriss edited this page 2024-06-04 16:48:09 +01:00

Community News

Overview

This directory contains various tools for managing the Community News shows:

  • reserving Community News slots ahead of time
  • making email to announce the upcoming Community News show recording
  • managing the iCal calendar with Community News reservations in it
  • making the show notes for the Community News shows (used for the recording and saved in the database)

Functions

Reserving Community News slots

The script used is called reserve_cnews and is capable of reserving a number of shows from a given date.

A copy of the internal documentation for this script (available through the -help option) is available in manual page format by following this documentation link.

Usage summary

$HOME/HPR/Community_News/reserve_cnews -config=$HOME/HPR/.hpr_livedb.cfg -from -count=1

The script is normally run with the live database configuration file, so the tunnel to the server must be open. The -from option can be used without the date part which causes the script to find the reservation with the latest date and add more reservations beyond it. It is advised to use -count=1 because the default behaviour is to add 12 reservations which may be excessive.

At the time of writing (2023-04-10) 12 reservations are maintained, with one being added each month. This is done to help ensure hosts posting shows into the future are less likely to clash with the first Monday of each month.

Announcing the next Community News show

This function is managed by the script called make_email.

This script was written in 2013 with the intention that it would send out email to the HPR mailing list. This functionality was never implemented, though it could probably be made to work now. The script has always been used to write the email to a file which is then copied into a message in an email client and sent to this list.

A copy of the internal documentation for this script (available through the -documentation option) is available in manual page format by following this documentation link.

Usage summary

> $HOME/HPR/Community_News/mailer.testfile # Empty the default file
$HOME/HPR/Community_News/make_email -dbconf=$HOME/HPR/.hpr_livedb.cfg
xclip -i $HOME/HPR/Community_News/mailer.testfile

The first line empties the file mailer.testfile in the working directory (where the script exists). The make_email script is then run with the live database configuration file (so the tunnel must be open) and every other option left in its default state. The xclip command can be used to place the file in the clipboard so it can be pasted into the email.

Refreshing the iCal calendar

TBA

Community News show notes

The notes for the Community News shows released every month are built with a script, a TT² template and various files for inclusion.

make_shownotes

This is the main script and is written in Perl. It accesses the MySQL/MariaDB database to gather show, host and comment information. It writes the notes for the selected show to the database. It needs the SSH tunnel to be set up before being run and to use this it requires the configuration file set up for this purpose.

It's possible to select the required template but the default name used by the script is shownote_template.tpl. For convenience this is a symbolic link to another file, and at the moment the target file is shownote_template11.tpl. Thus allowing the script to default the template name means the latest version is used. This template generates HTML and embeds some CSS definitions that affect the layout of the notes.

TBA

A copy of the internal documentation for this script is available in manual page format by following this documentation link.

NOTE The script documentation is in need of updates.


Back to Home page