Author: Joe Barr
One of the options allows you to indicate the type of date being recorded. If no option for the type is given, it is assumed to be a birthday. Here is the complete list of choices for type of date. So for Susan’s birthday, all I need to enter is:
Susan=21/06
Here are some of the options available to use with your date entries:
- bd Birthday
- ann Anniversary
- ev Event
- wn days Warn days in advance of date
- todate Event lasts until this date
- fordays days Event runs for days
My entry for the Novell Brainshare coming up this month looks like this:
Brainshare=20/03/2005 ev fordays 6
Enough data already, let’s get the executable. I installed Birthday from the Debian repository. Source and executable RPMs are also available for other distributions. If you want to hack the date format, of course, you’ll need the source. For today’s exercise, all you need is the executable.
Birthday won’t do much until you create the .birthdays text file using the format described above. Once you have that chore done, it’s ready to go. Here is what mine looks like for the near future:
Susan=21/06/19xx bd Susan=04/02/1999 an Brainshare=20/03/2005 ev fordays 6 Ides of March=15/03 ev Paula=03/04 bd Taxes=15/04 ev
The default warning period is 21 days, so simply entering birthday
at the CLI produces:
Ides of March in 1 week's time. Brainshare for 1 day in 1 week and 5 days' time.
The event horizon can be expanded with the addition of a command line argument, like this:
birday -W 90
Which produces:
Ides of March in 1 week's time. Brainshare for 1 day in 1 week and 5 days' time. Paula has a birthday in 3 weeks and 5 days' time. Taxes in 1 month and 1 week's time.
You can also format the output as a calendar, suitable for printing. Like this:
birthday -c
The calendar format option looks like this.
---Saturday-April-02-2005------------------------------------------------------- ---Sunday-April-03-2005--------------------------------------------------------- Paula has a birthday
An entry like those above is printed for each day in the warning period. I am only showing two days in this example to conserve space.
Other command line options allow you set the warning period to weeks, adjust the width of the calendar output, use another file as input, and adjust the number of lines printed for each day. For the details on those, see the man page.