Adjustments for new website
Community_News/make_meeting: added a new -output=FILE option
Community_News/shownote_template.tpl: removed reference to previous name
shownote_template13.tpl
Community_News/shownotes_container.tpl: rewrote to use the new website
design. Also removed some irrelevant parts like the navigation links
and the comment form.
This commit is contained in:
@@ -10,16 +10,16 @@
|
||||
# recurrence description is not adequate.
|
||||
#
|
||||
# OPTIONS: None
|
||||
# REQUIREMENTS: Needs modules Getopt::Long, Data::ICal, Date::Parse and
|
||||
# Date::Calc
|
||||
# REQUIREMENTS: Needs modules Getopt::Long, Data::ICal, Date::ICal,
|
||||
# Date::Parse and Date::Calc
|
||||
# BUGS: ---
|
||||
# NOTES: Based on a script distributed with the HPR episode "iCalendar
|
||||
# Hacking"
|
||||
# AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com
|
||||
# LICENCE: Copyright (c) year 2012-2024 Dave Morriss
|
||||
# VERSION: 0.2.3
|
||||
# LICENCE: Copyright (c) year 2012-2025 Dave Morriss
|
||||
# VERSION: 0.2.4
|
||||
# CREATED: 2012-10-13 15:34:01
|
||||
# REVISION: 2024-10-28 13:17:44
|
||||
# REVISION: 2025-10-23 16:51:48
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -42,7 +42,7 @@ use Date::ICal;
|
||||
#
|
||||
# Version number (manually incremented)
|
||||
#
|
||||
our $VERSION = '0.2.3';
|
||||
our $VERSION = '0.2.4';
|
||||
|
||||
#
|
||||
# Script name
|
||||
@@ -88,9 +88,10 @@ usage() if ( $options{'help'} );
|
||||
#
|
||||
# Collect options
|
||||
#
|
||||
my $count = ( defined( $options{count} ) ? $options{count} : $DEF_COUNT );
|
||||
my $count = ( defined( $options{count} ) ? $options{count} : $DEF_COUNT );
|
||||
my $reminder = ( defined( $options{reminder} ) ? $options{reminder} : 0 );
|
||||
my $force = ( defined( $options{force} ) ? $options{force} : 0 );
|
||||
my $outfile = $options{output};
|
||||
|
||||
#my $reminder_summary = ( defined( $options{summary} ) ? $options{summary} :
|
||||
# $DEF_SUMMARY );
|
||||
@@ -120,6 +121,19 @@ else {
|
||||
@startdate = Today();
|
||||
}
|
||||
|
||||
#
|
||||
# Open the output file (or STDOUT)
|
||||
#
|
||||
my $outfh;
|
||||
if ($outfile) {
|
||||
open( $outfh, ">:encoding(UTF-8)", $outfile )
|
||||
or die "Unable to open $outfile for writing: $!\n";
|
||||
}
|
||||
else {
|
||||
open( $outfh, ">&", \*STDOUT )
|
||||
or die "Unable to initialise for writing: $!\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Date and time values
|
||||
#
|
||||
@@ -291,7 +305,7 @@ if ($reminder) {
|
||||
#
|
||||
# Print the result
|
||||
#
|
||||
print $calendar->as_string;
|
||||
print $outfh $calendar->as_string;
|
||||
|
||||
exit;
|
||||
|
||||
@@ -440,7 +454,7 @@ sub ISO8601_Date {
|
||||
#===============================================================================
|
||||
sub usage {
|
||||
print STDERR <<EOD;
|
||||
Usage: $PROG [options] [FILE...]
|
||||
Usage: $PROG [options]
|
||||
|
||||
$PROG v$VERSION
|
||||
|
||||
@@ -452,6 +466,8 @@ adds reminders in the form of TODO items in relation to each meeting.
|
||||
-count=N Number of entries; default 12
|
||||
-[no]force Allow a -from=DATE date before today; default not
|
||||
-[no]reminder Add a reminder TODO item; default no
|
||||
-output=FILE Name of file to write to; optional, writes to STDOUT
|
||||
if omitted
|
||||
|
||||
EOD
|
||||
# -summary=TEXT Alternative text for the reminder (default 'Send out
|
||||
@@ -472,7 +488,8 @@ EOD
|
||||
sub Options {
|
||||
my ($optref) = @_;
|
||||
|
||||
my @options = ( "help", "from=s", "count=i", "force!", "reminder!");
|
||||
my @options
|
||||
= ( "help", "from=s", "count=i", "force!", "reminder!", "output=s" );
|
||||
# "summary|rs=s" );
|
||||
|
||||
if ( !GetOptions( $optref, @options ) ) {
|
||||
|
||||
Reference in New Issue
Block a user