use strict; my $html = <<'HTML_TEMPLATE'; When

When

When is an extremely simple personal calendar program, aimed at the Unix geek who wants something minimalistic. It can keep track of things you need to do on particular dates. There are a lot of calendar and "personal information manager" programs out there, so what reasons are there to use When?

  • It's a very short and simple program, so you can easily tinker with it yourself.
  • It doesn't depend on any libraries, so it's easy to install. You should be able to install it on any system where Perl is available, even if you don't have privileges for installing libraries.
  • Its file format is a simple text file, which you can edit in your favorite editor.

Joe Barr has written a nice intro to the program in his column at linux.com.

The current version of When is VERSION.

generic instructions for installing When

Source code: when.tar.gz

No libraries are required. Download the source code, and then do this:

  tar -zxvf when.tar.gz
  cd when_dist
  make install
The program's man page is reproduced on this web page.

Ubuntu

You can install the program simply by doing an "apt-get install when".

generic Debian

Here are the Debian package and source package.

Gentoo package

app-misc/when

FreeBSD port

deskutils/when

Red Hat

I've tested the script on Fedora Core 3, and it works fine. However, I've had reports from users running Red Hat 9.0 that it doesn't work on their systems, giving the message "Syntax error in calendar." This appears to be a problem with the way Red Hat 9.0 and Perl 5.8.0 interact with respect to UTF8 and internationalization, and can probably be solved by upgrading to a more recent version of Perl.

how to help

Any of the following contributions would be gratefully accepted:

  • Translate When into more languages.
  • Test my suggested workaround (upgrading Perl) for the problem with Red Hat 9.0.
  • Write external programs to convert to and from iCalendar and vCalendar formats.
  • Add support for calculating the Eastern Orthodox date of Easter. (If anyone can send me Perl code to calculate the day and month of Easter in a given year, I can incorporate it into the program. I want to add a switch, --WESTERN_EASTER, which will default to 1, but can be set to 0 to get the Eastern version.)

man page

MANPAGE

[Home | Site Map | Privacy | Contact ]

(c) Copyright 2003 Benjamin Crowell. All rights reserved.

HTML_TEMPLATE my $man = `nroff -man when.1`; $man =~ s/(.)\x{08}./$1/g; $man =~ s/[^ \w,.\-:;'"()[]{}<>+=|\\`~!?\/@#$%^&*_]//g; my $version = `perl when --bare_version`; $version =~ m/((\d+\.)+\d+)/; $version = $1; # ... same logic as in Makefile $html =~ s/VERSION/$version/g; $html =~ s/MANPAGE/$man/g; print clean_up_text($html); #------------------ sub clean_up_text { # gets rid of Mac and Windows curly quotes # changes crlf to \n, etc. # converts utf8/Mac/Win m-dashes to --, and n-dashes to - my $text = shift; # curly quotes: $text =~ s/\xe2\x80(\x9c|\x9d)/"/g; # utf8 curly quotes $text =~ s/\xe2\x80(\x98|\x99)/'/g; # utf8 curly apostrophe/single quotes $text =~ s/\xef\xa3\xa7/--/g; # utf8 m-dash $text =~ s/\xe2\x80\x94/--/g; # another type of utf8 m-dash?? $text =~ s/(\223|\224)/"/g; # octal; Windows curly quotes $text =~ s/(\221|\222)/'/g; # octal; Windows curly apostrophe/single quotes $text =~ s/\226/-/g; # Windows n-dash $text =~ s/\227/--/g; # Windows m-dash $text =~ s/(\xd2|\xd3)/"/g; # Mac curly quotes $text =~ s/(\xd4|\xd5)/"/g; # Mac curly apostrophe/single quotes $text =~ s/\xd0/-/g; # Mac n-dash $text =~ s/\xd1/--/g; # Mac m-dash $text =~ s/\xc9/.../g; # Mac ellipsis $text =~ s/\r\n/\n/g; # crlf -> newline $text =~ s/\r/\n/g; # cr -> newline $text =~ s/\342\200\220/-/g; # octal; some goofy version of a hyphen return $text; }