Manage your time with Remind

11516

Author: Joe 'Zonker' Brockmeier

One thing most people are bad at is remembering things — anniversaries, deadlines, schedules. Computers, on the other hand, are very good at tracking things — so long as you have a way to tell them to do so. Remind, a GPLed calendar and alarm application from Roaring Penguin, is a good way to keep track of your appointments and commitments on your computer so you don’t need to worry about keeping them in your head.

Remind is available from the Roaring Penguin Web site, and several distros offer a Remind package. For Debian or Ubuntu, just run apt-get install remind or use Synaptic or Adept to install the package.

Remind offers a choice of GUI front ends (more on them in a moment), but for those who are not afraid to use a text editor, Remind’s syntax can be pretty simple. For example, if you want to remember an anniversary or birthday on July 10, you can add a line like this to your ~/.reminders file:

REM Jul 10 2007 MSG Anniversary

This would remind you, on July 10, 2007, that it’s an anniversary. The date syntax is somewhat flexible, and it’s optional. If you leave off the date entirely, then Remind will treat the reminder as something to repeat daily. The MSG keyword tells Remind to print the text string that follows it.

You can also just specify a date for recurring events. For instance, to remind yourself to pay rent on the first day of each month:

REM 1 MSG Pay rent!

This will display the message the first day of every month. If you want advanced notice, you can add reminders for five days before rent is due using REM 1 +5 MSG Pay rent! You can also specify by day of the week, to print a message every Saturday, like so:

REM Sat MSG Go to the movies

Let’s say you want to go to the gym ever other day. You can set that up by setting the start date, and then adding *2 right after the date, which tells Remind to re-run the reminder every other day:

REM Jul 22 2006 *2 MSG Go to the gym

You do need to specify the full date for the repeat syntax to work — so REM Jul 22 *2 won’t cut it.

wxRemind day view – click to enlarge

Sometimes, you want to run a reminder until something happens — like, feed your neighbors’ cat until they come back from vacation. Remind has the UNTIL keyword for just this kind of event. If your neighbors will be gone from August 10 through August 15, use the following:

REM Aug 10 2006 *1 UNTIL Aug 15 2006 MSG Feed Fluffikins for friend

Make sure to add the *1, which tells Remind to repeat the reminder every day — otherwise, Fluffikins is going to be a very, very hungry kitty — and your friend may not be very happy with you.

A reminder isn’t much good if it doesn’t come in time to prep for an event. You don’t want to be reminded of important anniversaries, birthdays, and meetings only on the day of the event — you want some warning well in advance. If you’d like to get a reminder three days in advance, you can use this syntax:

REM 25 Jul 2006 +4 MSG Don't forget your anniversary!

This will issue a reminder every day from the 21st to 25th.

What if you want only one reminder? Remind has a ONCE keyword that indicates that a reminder should only be issued one time, so you don’t have to be nagged to death:

REM ONCE Jul 10 2007 MSG Just tell me once!

In fact, Remind can do more than nag you — it can do something all on its lonesome. Instead of using MSG, use RUN to execute a command, like so:

REM Mon RUN command

This would run the command every Monday. One use for the RUN keyword is to send yourself a reminder via email using a command like REM Sat RUN mail -s < /dev/null user@email.net. That will send the reminder with an empty body — alternately, you can include a file for the body of the message, which might be good if you’re sending reminders to other people.

To keep things simple, you can include files with recurring events or holidays outside your personal ~/.reminders file by using includes. The syntax for includes is simple:

INCLUDE /path/to/included/file

Running Remind regularly

How do you ensure that Remind actually runs to see to it that you get your reminders? Obviously, it doesn’t make much sense to run the program manually every day just to get your reminders. One way to schedule Remind is to run it as a cron job — just add a cron job to run Remind once every five minutes, or once an hour, whatever makes sense given your schedule.

Another way to schedule Remind at regular intervals is to use the -z option, which runs Remind as a daemon. You can specify how often you want Remind to run, from every five minutes (the default) to every 60 minutes. To schedule it to run once every 10 minutes, use remind -z10.

This is just a small sample of what Remind can do — be sure to read through the man page for all of the program’s options and full syntax. The best way to learn the syntax, of course, is to look at examples. The folks at 43Folders have a Remind Cookbook with a number of recipes that demonstrate Remind’s capabilities.

Once you’ve put in one or more reminders, you’re going to want to see the reminders at some point. To display today’s reminders, run rem. To get a list of all reminders, run rem -n. If you’d like them sorted by date (which Remind doesn’t do automatically) run rem -n | sort.

Making Remind easier to use

Remind has several front-end applications that make it easier to add entries to your reminders file. If you’re not crazy about struggling with the syntax, you can opt to use TkRemind, Wyrd, or wxRemind.

TkRemind provides a Tk-based GUI for Remind, and is included with the Remind package. You can just click on a date to add a reminder, and the dialog allows you to provide a specific time for events, repetition, to skip the reminder on weekends, and so on. It’s somewhat limited in the syntax that it supports — you can’t set a RUN keyword instead of MSG, for example — but it’s an easy way to manage your reminders.

Wyrd is a text-based Remind front end for displaying and editing Remind events. Actually, Wyrd displays reminders, and pops you into Vim to edit your ~/.reminders file. You’ll still need to understand the Remind syntax, though — Wyrd doesn’t provide any assistance in editing the .reminders file, other than opening it for you.

Finally, there’s wxRemind, which is a GUI front end for Remind using wxPython. In addition to letting you set reminders and events using Remind, wxRemind can integrate with Festival to announce your events, and will automatically produce a PostScript version of your monthly calendar and open it in gv for you.

Displaying Remind calendars

Remind also comes with programs to generate output for print or display on the Web. The rem2ps script, as its name implies, takes output from Remind and generates a PostScript calendar that’s suitable for printing. If you’d prefer to display your calendar online, ps2html will take Remind’s output and generate an HTML calendar.

The most basic usage of rem2ps is remind -p | rem2ps > remind.ps. This will run Remind with the appropriate output for rem2ps, then pipe it to rem2ps, which will send the output to the file remind.ps. If you’d like to have a PDF copy of the calendar instead, you can use ps2pdf to generate a decent PDF copy.

If you’d like to generate more than one month of output, append a number to the -p option. For example, if you’d like to generate a 12-month calendar, run remind -p12 | rem2ps > remind.ps. The default is to produce a calendar in portrait mode, but if you’d like the calendar in landscape mode, use the -l option with rem2ps.

Depending on the way Remind is compiled, it will produce output for Letter or A4 media. If you’d like to change this, the -m option will allow you to specify the type of media you’d like to print the calendar on — see the rem2ps man page for media types.

For some reason, while rem2ps is installed as part of the Ubuntu and Debian packages, rem2html is not. You can find a gzipped copy of rem2html under /usr/share/doc/remind/www if you’ve installed Remind on Debian. If you’ve grabbed the source from the Roaring Penguin Web site, you’ll find rem2html in the www directory of the source distribution. You can copy this to ~/bin or any directory in your path.

The syntax for rem2html is pretty much the same as rem2ps: remind -p | rem2html > remind.html will produce a one-month HTML calendar. If you have a header or footer you’d like to add to the file, the -p option will allow you to add an HTML file to the foot of the page, and -a will allow you to add an HTML file to the header of the page.

Remind is a little less intuitive, at first, but it provides a lot of flexibility that a lot of Linux users will appreciate. If you’re more at home at the command line than using a GUI, you definitely want to check our Remind for managing your time.