Compare commits

..

15 Commits

Author SHA1 Message Date
Dianne Skoll
de03d0c02a Prep for 06.02.05 release. 2026-03-02 10:47:07 -05:00
Dianne Skoll
3e6e3b6a34 Use original font size for MOON and WEEK specials. 2026-03-02 10:21:21 -05:00
Dianne Skoll
bf48e31335 Add --entry-spacing option to rem2pdf. 2026-03-02 10:15:55 -05:00
Dianne Skoll
77c0beffb3 Make inter-entry spacing 0.5 * border size. 2026-02-28 11:53:51 -05:00
Dianne Skoll
9a724d7618 Scale entry spacing as well as font size if we use --avoid-overfull. 2026-02-27 23:47:19 -05:00
Dianne Skoll
1c20f54edb Fix typo 2026-02-27 23:33:33 -05:00
Dianne Skoll
52b36d4503 Link the Fill page and Avoid over-full boxes checkbuttons. 2026-02-27 16:46:16 -05:00
Dianne Skoll
0a82eadea6 Update TkRemind man page. 2026-02-27 16:36:42 -05:00
Dianne Skoll
0cd4fe67d1 Fix typo 2026-02-27 16:33:59 -05:00
Dianne Skoll
9c31004b62 Add --avoid-overfull option to rem2pdf 2026-02-27 16:27:57 -05:00
Dianne Skoll
3431833be2 Another wording tweak. 2026-02-20 16:48:32 -05:00
Dianne Skoll
a98a4b9f72 Another update to README.md. 2026-02-20 16:33:31 -05:00
Dianne Skoll
4aaba4da88 Update README 2026-02-20 11:11:49 -05:00
Dianne Skoll
98e37d8c54 Put reference to book in man page. 2026-02-17 10:08:18 -05:00
Dianne Skoll
4335aac7b2 Fix spelling of "Auckland"; add Matariki.
Fixes courtesy of Bart Joy.
2026-02-16 10:45:52 -05:00
15 changed files with 166 additions and 38 deletions

View File

@@ -95,16 +95,9 @@ though I suspect it's entirely or almost entirely human-written.
2. No AI-generated patches or other sorts of contributions to Remind
will be accepted.
3. Remind's source code may not be used to train an AI model,
including an LLM model, unless all of the output of said model is
released under the GNU General Public License, version 2. If you use
any of Remind's source code to train your model, then anything that
the model produces is a derived product of Remind and must be licensed
under the same terms as Remind.
---
Contact info: dianne@skoll.ca
Home page: [https://dianne.skoll.ca/projects/remind/](https://dianne.skoll.ca/projects/remind/)
3. It is not yet settled whether, if you train an AI model on this
source code, the resulting model, and/or any outputs it produces, are
derivative works of the code. But if they are, and do not fall under
"fair use" or equivalent in your jurisdiction, then as with any other
derivative work you may only distribute them under the terms of the
GNU General Public License, version 2.

18
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for remind 06.02.04.
# Generated by GNU Autoconf 2.72 for remind 06.02.05.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -601,8 +601,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='remind'
PACKAGE_TARNAME='remind'
PACKAGE_VERSION='06.02.04'
PACKAGE_STRING='remind 06.02.04'
PACKAGE_VERSION='06.02.05'
PACKAGE_STRING='remind 06.02.05'
PACKAGE_BUGREPORT=''
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
@@ -1258,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures remind 06.02.04 to adapt to many kinds of systems.
'configure' configures remind 06.02.05 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1320,7 +1320,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of remind 06.02.04:";;
short | recursive ) echo "Configuration of remind 06.02.05:";;
esac
cat <<\_ACEOF
@@ -1408,7 +1408,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
remind configure 06.02.04
remind configure 06.02.05
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1871,7 +1871,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by remind $as_me 06.02.04, which was
It was created by remind $as_me 06.02.05, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -4892,7 +4892,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by remind $as_me 06.02.04, which was
This file was extended by remind $as_me 06.02.05, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4957,7 +4957,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
remind config.status 06.02.04
remind config.status 06.02.05
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

View File

@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(remind, 06.02.04, , , https://dianne.skoll.ca/projects/remind/)
AC_INIT(remind, 06.02.05, , , https://dianne.skoll.ca/projects/remind/)
AC_CONFIG_SRCDIR([src/queue.c])
cat <<'EOF'

View File

@@ -1,5 +1,25 @@
CHANGES TO REMIND
* VERSION 06.02.05 - 2026-03-02
- NEW FEATURE: rem2pdf: Add --avoid-overfull option. This makes the
font size in a calendar box with many reminders smaller in an effort
to fit everything neatly into the box.
- NEW FEATURE: rem2pdf: Add --entry-spacing option. This lets you
adjust the spacing between entries in a calendar box. It defaults
to one-half of the --border-size option. NOTE: In previous
releases, --entry-spacing defaulted to the SAME size as
--border-size, so unless you supply an --entry-spacing value to set
it back, the PDF calendars produced by this version of rem2pdf will
be slightly more compact than previous versions.
- DOCUMENTATION UPDATE: Clarify rules around use of Remind source code
for training AI models.
- FIX: include/holidays/nz.rem: Fix spelling of "Auckland" and add
Matariki. Fixes courtesy of Bart Joy.
* VERSION 06.02.04 - 2026-02-15
- IMPROVEMENT: remind: Add the mblower and mbupper functions, which are

View File

@@ -34,3 +34,36 @@ REM 27 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 0] MSG %"Christm
REM 27 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 6] MSG %"Christmas Day (observed)%" %! %b.
REM 28 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 0] MSG %"Boxing Day (observed)%" %! %b.
REM 28 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 6] MSG %"Boxing Day (observed)%" %! %b.
# Matariki. Source:
# https://www.legislation.govt.nz/act/public/2022/0014/23.0/LMS557893.html#LMS557893
OMIT 2022-06-24 MSG Matariki
OMIT 2023-07-14 MSG Matariki
OMIT 2024-06-28 MSG Matariki
OMIT 2025-06-20 MSG Matariki
OMIT 2026-07-10 MSG Matariki
OMIT 2027-06-25 MSG Matariki
OMIT 2028-07-14 MSG Matariki
OMIT 2029-07-06 MSG Matariki
OMIT 2030-06-21 MSG Matariki
OMIT 2031-07-11 MSG Matariki
OMIT 2032-07-02 MSG Matariki
OMIT 2033-06-24 MSG Matariki
OMIT 2034-07-07 MSG Matariki
OMIT 2035-06-29 MSG Matariki
OMIT 2036-07-18 MSG Matariki
OMIT 2037-07-10 MSG Matariki
OMIT 2038-06-25 MSG Matariki
OMIT 2039-07-15 MSG Matariki
OMIT 2040-07-06 MSG Matariki
OMIT 2041-07-19 MSG Matariki
OMIT 2042-07-11 MSG Matariki
OMIT 2043-07-03 MSG Matariki
OMIT 2044-06-24 MSG Matariki
OMIT 2045-07-07 MSG Matariki
OMIT 2046-06-29 MSG Matariki
OMIT 2047-07-19 MSG Matariki
OMIT 2048-07-03 MSG Matariki
OMIT 2049-06-25 MSG Matariki
OMIT 2050-07-15 MSG Matariki
OMIT 2051-06-30 MSG Matariki

View File

@@ -10,4 +10,4 @@
# If you want the national holidays as well, you must
# also SYSINCLUDE holidays/nz.rem
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Aukland Anniversary Day%" %! %b.
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Auckland Anniversary Day%" %! %b.

View File

@@ -10,4 +10,4 @@
# If you want the national holidays as well, you must
# also SYSINCLUDE holidays/nz.rem
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Aukland Anniversary Day%" %! %b.
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Auckland Anniversary Day%" %! %b.

View File

@@ -1,6 +1,10 @@
.TH REMIND 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
.SH NAME
remind \- a sophisticated reminder service
.SH THE BOOK OF REMIND
This man page is a good \fIreference\fR for Remind. However, if you
are a novice wishing to \fIlearn\fR Remind, I suggest downloading
"The Book of Remind" from the Remind home page at https://dianne.skoll.ca/projects/remind/
.SH SYNOPSIS
.B remind [\fIoptions\fR] \fIfilename\fR [\fIdate\fR] [\fI*rep\fR] [\fItime\fR]
.SH DESCRIPTION

View File

@@ -195,6 +195,12 @@ Select the appropriate paper size and orientation. Activate
be the normal case unless you have many reminders in a particular
day. (See the \fBrem2pdf\fR documentation.)
If you activate \fBAvoid over-full boxes\fR, then \fBTkRemind\fR
will pass the \fB\-\-avoid\-overfull\fR option to \fBrem2pdf\fR. This
will make it try to fit many reminders into a calendar box by shrinking
the font. This option, if activated, also automatically activates
\fBFill page\fR.
Finally, click \fBPrint\fR to print or \fBCancel\fR to cancel. Note
that during printing, \fBRemind\fR is called with the
\fB-itkremind=1\fR option and also an additional \fB-itkprint=1\fR

View File

@@ -42,7 +42,7 @@ my $settings = {
media => 'Letter',
width => 0,
height => 0,
avoid_overfull_boxes => 0,
title_font => 'Sans',
header_font => 'Sans',
daynum_font => 'Sans Bold Oblique',
@@ -56,6 +56,7 @@ my $settings = {
entry_size => 8,
border_size => 4,
entry_spacing => -1,
line_thickness => 1,
margin_top => 36,
@@ -96,6 +97,7 @@ Options:
--ps Output PostScript instead of PDF
--eps Output encapsulated PostScript instead of PDF
-cN Synonym for --small-calendars=N
--avoid-overfull Shrink font size to avoid over-full boxes. Implies -e
--left-numbers, -x Print day numbers on the left (monthly calendars only)
--fill-page, -e Fill the entire page (monthly calendars only)
--media=MEDIA, -mMEDIA Size for specified media
@@ -112,6 +114,7 @@ Options:
--header-size=S Specify size of font for weekday names
--daynum-size=S Specify size of font for day numbers
--entry-size=S Specify size of font for calendar entries
--entry-spacing=S Specify extra spacing between calendar entries
--border-size=S Specify size of gaps between items in 1/72nds of an inch
--line-thickness=S Specify line thickness in 1/72nds of an inch
--margin-top=S Specify top margin size in 1/72nds of an inch
@@ -139,6 +142,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
'svg' => \$settings->{svg},
'ps' => \$settings->{ps},
'eps' => \$settings->{eps},
'avoid-overfull' => \$settings->{avoid_overfull_boxes},
'fill-page|e' => \$settings->{fill_entire_page},
'weeks-per-page|p=i' => \$settings->{weeks_per_page},
'media|m=s' => \$settings->{media},
@@ -155,6 +159,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
'header-size=f' => \$settings->{header_size},
'daynum-size=f' => \$settings->{daynum_size},
'entry-size=f' => \$settings->{entry_size},
'entry-spacing=f' => \$settings->{entry_spacing},
'border-size=f' => \$settings->{border_size},
'line-thickness=f' => \$settings->{line_thickness},
'margin-top=f' => \$settings->{margin_top},
@@ -186,6 +191,15 @@ if ($version) {
exit(0);
}
if ($settings->{entry_spacing} < 0) {
$settings->{entry_spacing} = 0.5 * $settings->{border_size};
}
if ($settings->{avoid_overfull_boxes}) {
$settings->{fill_entire_page} = 1;
}
my $bad = 0;
foreach my $setting (qw(bg_color line_color title_color header_color daynum_color smallcal_color)) {
my $c = $settings->{$setting};
@@ -288,6 +302,9 @@ if ($settings->{svg}) {
$settings->{width}, $settings->{height});
}
# Save original entry size
$settings->{original_entry_size} = $settings->{entry_size};
# set_metadata not available in older versions of Cairo
eval { $surface->set_metadata('title', 'Calendar'); };
eval { $surface->set_metadata('author', 'Remind (https://dianne.skoll.ca/projects/remind/)'); };
@@ -481,6 +498,12 @@ the default top-right.
Make the calendar fill the available space on the page.
=item --avoid-overfull
If a calendar box is going to overflow, try to make the entries fit by
decreasing the font size. Using the --avoid-overfull option automatically
enables the --fill-page option.
=item --media=I<media>, -mI<media>
Specify the paper size (Letter, A4, etc.) For a list of valid media sizes,
@@ -549,6 +572,12 @@ Specify the size of the blank border between the contents of a calendar
box and the centre of the lines surrounding it, in 1/72ndths of an inch.
The default is 4.
=item --entry-spacing=I<n>
Specify the amount of extra space, in 1/72ndths of an inch, to leave
between calendar entries in a given calendar box. The default is
one-half of the --border-size value.
=item --line-thickness=I<n>
Specify the thickness of the lines drawn on the calendar. The default is 1.

View File

@@ -608,7 +608,28 @@ sub draw_row
for (my $col=0; $col<7; $col++) {
my $day = $self->{daymap}->[$row]->[$col];
next if ($day < 1);
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
if ($settings->{avoid_overfull_boxes}) {
my $old_entry_size = $settings->{entry_size};
my $old_spacing = $settings->{entry_spacing};
my $drawn = 0;
while ($settings->{entry_size} >= 2.0) {
my $h = $self->draw_day($cr, $settings, $so_far, $day, $col, 0);
if ($h <= $height) {
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
$drawn = 1;
last;
}
$settings->{entry_size} -= 0.125;
$settings->{entry_spacing} = $old_spacing * $settings->{entry_size} / $old_entry_size;
}
if (!$drawn) {
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
}
$settings->{entry_size} = $old_entry_size;
$settings->{entry_spacing} = $old_spacing;
} else {
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
}
}
return $so_far + $height + $settings->{border_size} * 2;
@@ -717,8 +738,8 @@ sub draw_day
next;
}
if ($done) {
$so_far += $settings->{border_size};
$entry_height += $settings->{border_size};
$so_far += $settings->{entry_spacing};
$entry_height += $settings->{entry_spacing};
}
$done = 1;
my $h2 = $entry->render($self, $cr, $settings, $so_far, $day, $col, $height);

View File

@@ -146,7 +146,7 @@ sub render
my $layout = Pango::Cairo::create_layout($cr);
$layout->set_text(Encode::decode('UTF-8', $self->{body}));
my $desc = Pango::FontDescription->from_string($settings->{entry_font} . ' ' . int(0.75 * $settings->{entry_size}) . 'px');
my $desc = Pango::FontDescription->from_string($settings->{entry_font} . ' ' . int(0.75 * $settings->{original_entry_size}) . 'px');
$layout->set_font_description($desc);
my ($wid, $h) = $layout->get_pixel_size();
@@ -197,7 +197,7 @@ sub render
my $layout;
my $bodywidth = 0;
if ($self->{fontsize} <= 0) {
$self->{fontsize} = $settings->{entry_size};
$self->{fontsize} = $settings->{original_entry_size};
}
if ($self->{size} <= 0) {
$self->{size} = $settings->{daynum_size};

View File

@@ -342,6 +342,9 @@ set Option(PrintOrient) landscape
set OptDescr(PrintFill) "(0/1) If 1, fill entire page when printing"
set Option(PrintFill) 1
set OptDescr(PrintAvoidOverfull) "(0/1) If 1, avoid over-full calendar boxes if possible"
set Option(PrintAvoidOverfull) 0
set OptDescr(WrapCal) "(0/1) If 1, make printed calendars occupy at most 5 rows"
set Option(WrapCal) 0
@@ -1758,7 +1761,8 @@ proc DoPrintHelper {} {
radiobutton .p.landscape -text "Landscape" -variable Option(PrintOrient) -value landscape
radiobutton .p.portrait -text "Portrait" -variable Option(PrintOrient) -value portrait
checkbutton .p.fill -text "Fill page" -variable Option(PrintFill)
checkbutton .p.fill -text "Fill page" -variable Option(PrintFill) -command PrintFillButtonPressed
checkbutton .p.avoid -text "Avoid over-full boxes" -variable Option(PrintAvoidOverfull) -command PrintAvoidOverfullButtonPressed
checkbutton .p.wrap -text "Use at most 5 rows" -variable Option(WrapCal)
checkbutton .p.right -text "Day numbers at top-right" -variable Option(PrintDaysRight)
checkbutton .p.calendars -text "Print small calendars" -variable Option(PrintSmallCalendars)
@@ -1770,7 +1774,7 @@ proc DoPrintHelper {} {
wm protocol .p WM_DELETE_WINDOW { .p.cancel flash; .p.cancel invoke }
pack .p.f1 .p.ff .p.f2 .p.f2a .p.f3 .p.f3a \
-side top -fill both -expand 1 -anchor w
pack .p.fill .p.wrap .p.right .p.calendars -in .p.f3a \
pack .p.fill .p.avoid .p.wrap .p.right .p.calendars -in .p.f3a \
-side top -anchor w -fill none -expand 0
pack .p.f4 -side top -fill both -expand 1 -anchor w
pack .p.f11 .p.f12 -in .p.f1 -side top -fill none -expand 0 -anchor w
@@ -1861,6 +1865,9 @@ proc DoPrintHelper {} {
append cmd " -e"
}
if {$Option(PrintAvoidOverfull)} {
append cmd " --avoid-overfull"
}
if {!$Option(PrintDaysRight)} {
append cmd " -x"
}
@@ -1883,6 +1890,19 @@ proc DoPrintHelper {} {
}
}
proc PrintFillButtonPressed {} {
global Option
if { ! $Option(PrintFill) && $Option(PrintAvoidOverfull) } {
set Option(PrintAvoidOverfull) 0
}
}
proc PrintAvoidOverfullButtonPressed {} {
global Option
if { ! $Option(PrintFill) && $Option(PrintAvoidOverfull) } {
set Option(PrintFill) 1
}
}
proc ShowPrintCommand { cmd } {
global Option
catch { destroy .pc }

View File

@@ -257,6 +257,7 @@ Makefiles
Marczykowski
Marek
Marinus
Matariki
MaxFullOmits
MaxLateMinutes
MaxPartialOmits
@@ -757,6 +758,7 @@ noto
nqueued
nroff
num
nz
ok
oktober
ol

View File

@@ -1046,7 +1046,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "06.02.04"
version() => "06.02.05"
set a059 wkday(today())
today() => 1991-02-16
wkday(1991-02-16) => "Saturday"
@@ -2609,7 +2609,7 @@ a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
a007 "1991-02-16"
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
a008 "11:44"
a058 "06.02.04"
a058 "06.02.05"
a059 "Saturday"
a010 12
a060 6
@@ -5563,8 +5563,8 @@ REM SATISFY ""
REM SATISFY [version() > "01.00.00"]
../tests/test.rem(1074): SATISFY: expression has no reference to trigdate() or $T...
../tests/test.rem(1074): Trig = Saturday, 16 February, 1991
version() => "06.02.04"
"06.02.04" > "01.00.00" => 1
version() => "06.02.05"
"06.02.05" > "01.00.00" => 1
../tests/test.rem(1074): Trig(satisfied) = Saturday, 16 February, 1991
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]
../tests/test.rem(1075): SATISFY: expression has no reference to trigdate() or $T...
@@ -23831,7 +23831,7 @@ SECURITY: Won't read world-writable file or directory!
Error reading include_dir/ww: Can't open file
SECURITY: Won't read world-writable file or directory!
Error reading include_dir/ww: No files matching *.rem
06.02.04
06.02.05
Enabling test mode: This is meant for the acceptance test.
Do not use --test in production.
In test mode, the system time is fixed at 2025-01-06@19:00