Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

datebook(4)

calendar(1)

cron(1)

DATEBOOK(1)

 

NAME

datebook − calendar and reminder program for X11
 

SYNOPSIS

datebook [-W] [-V] [-D date] [-F datefile]
 

DESCRIPTION

 
Datebook is a personal appointment calendar. It was written to solve the never ending problem of forgetting when you need to attend a meeting, go to the doctor, or phone home. Datebook provides calendar features, that let you enter and review events for a particular day or week, as well as reminder features that notify you before particular events.
 
Each activity or appointment entered into Datebook is considered an event. Events that are specified with a time will generate alarms. In the X11 environment, an alarm will cause an alarm window to appear on the user’s screen. This window will present the user with the option to acknowledge, delay (snooze) or delete the event in question. Outside of X11 the user can have datebook call a program or script when the alarm occurs (see AlarmNotify).
 
Events can be classified into various event classes. Each class can have a different amount of time that the user will be warned in advance of the event. For example, for local meetings you might want 5 minutes warning, but if the meeting is offsite 30 minutes warning would be more appropriate. The class can also specify the time to "snooze" before repeating an alarm. The class can also be used to specify a bitmap to be displayed in the alarm window.

OPTIONS

-W List the events for the next week to stdout. This option will not bring up X windows and will therefore work outside of X. 

-D date This option is like the list week option, but it only lists the events for a particular date. This date should be in a simple date (month, day and year) like 12/14/89 or November 28.  If used in combination with -W the week starting at date will be listed. 

-F datefile
This option allows the user to start with one or more (one -F option per file) date files instead of the date files specified by the ~/.datebookrc file.

-V Turns on the verbose mode. The program will print additional information about the program state. 
 

Display

The calendar window is composed of three parts: previous and next month buttons, a pull-down menu bar, and the calendar portion.  There are two pull-down menus labeled "Cmds" and the name and year of the current month. The first allows access to a number of commands while the second can be used to display the calendar for different months. 
 
In the calendar portion, the left mouse button will select (highlight) a date and display a browser on that date.
 
The browser window is also composed of three major parts, the event list portion, the buttons portion and the event specification portion.
 
In the event list portion each line is composed of fields which summarize the event.  The fields in the list are: the starting time of the event (if specified), the ending time of the event (if specified), and the first line of the event.
 
The left mouse button in the event list portion will select an event, and display the complete event specification in the bottom portion of the window.  The event specification is composed of the Date Specification, a Description, an optional start time , an optional end time, the class of the event and the file to which the event belongs. 
 
Between the list of events and the event specification is a row of buttons that operate on event list and the event specification. The Create Event button will create a new event from the specifications.  The Delete Selection button will delete the event that is selected in the event list.  The Clear Template button will remove all data in the  event specification portion but does not affect the event list. The Replace Selection button will substitute the data in the event specification portion for that in the currently selected event. 
 
On the browser title bar will be found a left and a right arrow. These can be used to browse the next or previous date, week or file (depending of the current browser contents).
 

$HOME/.rcfile

Facets of the Datebook program not related to window appearance can be controlled by the appropriate entries in your ~/.rcfile.  If the ~/.rcfile does not exist, then the file /usr/lib/X11/datebook/rcfile will be checked.  Note that the rc file name depends on the name of the program. If the name is datebook then the files searched for are ~/.datebookrc and /usr/lib/X11/datebook/datebookrc, renaming datebook to be datebk would cause it to look in the files ~/.datebkrc and /usr/lib/X11/datebook/datebkrc respectively. 

DateFiles
This is the single most important value as it allows the user to specify which event files to read in when the program is started. Some of these files will be owned by the user and others may be files that are common to a project, section, etc. The user will only be allowed to edit, delete from, or add to files that are owned by him. For this reason, at least one of the files in this list should be owned by the user.  Defaults to “~/.events”.  A relative file name will be interpreted to be relative to $HOME. 

Snooze: Determines how many minutes to delay when the user responds to an alarm with the snooze button. At the end of that time the alarm will be redisplayed.  This is the default snooze time. The snooze time can also be set on the basis of the event class. 

PrintWeek:
Specifies a program that will read the data to be printed on its standard input and send it to a printer. This program must be written to parse the standard datebook week summary format. The programs dbweek and dbweek_ps (postscript) are shipped with datebook. 

PrintMonth:
Specifies a program that will read the data to be printed on its standard input and send it to a printer. This program must be written to parse the standard datebook month summary format. The programs dbmonth and dbmonth_ps (postscript) are shipped with datebook. 

Morning:
The Morning entry can be used to save some typing. When the user says the meeting is at 2:00, it is rare for this to mean 2 AM, and yet that is how the program will interpret this input without the setting of this entry. If the hour is less than 12, then 12 is added to it to map it into the PM range. This will only be used then to map times that are not specified with AM or PM. Morning must be an integer. If Morning is not set, then the program will interpret and display time in 24 hour notation.

AlarmNotify:
When datebook is started from outside the X11 environment, this entry determines the program to call with the alarm message. After this program has been called, the alarm will be acknowledged. There is no way to snooze or to delete events from outside X11.

Check How often (in seconds) should datebook check to see if it is the time for any event. 

Synchronize
How many times should datebook check for alarms between checking to see if the date files need to be synchronized. If Check were 30 seconds and Synchronize were 2 then datebook would check the datefiles every minute.

Hidden This entry is followed by the class names of events that should not show up in the calendar.  They will display alarms in the normal fashion.  A typical use for Hidden event classes would be an everyday event telling you to go home.  Hidden classes also are not printed (Print Month, Print Week) or listed (-W, -D). 

Common
This entry is followed by the class names of events that should not show up in the calendar. They will appear in the browser and will display alarms in the normal fashion. A typical use for Common event classes would be meetings that occur periodically (every Monday perhaps). The calendar could then highlight days with unusual (uncommon) events.

Classes: This entry describes the event classes enclosed in {}’s.  In the example .datebookrc below, one of the classes specified is “meeting”. There is then an entry “meeting:  10 2 stop Red”. This entry specifies that the user wishes to be notified 10 minutes before a meeting, to snooze 2 minutes, the stop bitmap to be used in the alarm window, and the stop bitmap to be red. The syntax of a class entry is:

classname:  warning [snooze [bitmap [fg_color [bg_color]]]]

where fg_color and bg_color specify what foreground and background colors to use to display the bitmap in the alarm window. 

One sample ~/.rcfile might look like:
 # this is my rc file
DateFiles:.appts .birthdays /usr/local/lib/holidays
Snooze:5
Morning:6
Check:30
Synchronize:1
PrintWeek:dbweek "lp -or"
PrintMonth:dbmonth | lp
Hidden:nag
Common:periodic
 Classes
{
    periodic:10 5 remind
    meeting:10 2 stop Red
    offsite:30 5
    nag:0 10 michael
    birthday:0 5 cake
    trip:0 5 camera
}
 

 

Menu Commands

A number of commands are available via the pulldown menus. 

Version This command displays the version dialog. 

View Week
Change the cursor to prompt the user for a week to view (browse). When the user picks a week, then the browser will be changed to display all events of that week.

View File
Browse the events that are contained in a particular date file.

View Year
Bring up the year at a glance window. Picking on a particular month in this window will change the monthly calendar to the month selected.

Print Week
Change the cursor to prompt the user for a week to print. When the user picks a week, then the week will be formatted and printed using the program specified by the PrintWeek entry in the ~/.datebookrc file. 

Print Month
The events for the currently displayed month will be formatted and printed using the program specified by the PrintMonth entry in the ~/.datebookrc file. 

Write Events
The user will not usually need to explicitly write events. They are written when the browser is closed or when the user quits the program.

Synchronize Datefiles
The user will not usually need to explicitly synchronize datefiles. The program will periodicly check to see if date files have been modified and will attempt to reparse and merge changed files.

Highlight Classes
This command displays a dialog that will allow the user to change whether any class is Common or not (see above). Common classes are not highlighted on the calendar. The most common way to use this dialog would be to make all but a certain class Common to see if for instance there where any birthdays or meetings this month.

Quit Update all event files and exit the datebook program. 
 

$HOME/.Xdefaults

The visual appearance of the datebook windows is controlled by the /usr/lib/X11/app-defaults/Datebook.  It might be useful to look at the app-defaults file for Datebook to see what resources can be set, many are resources that are specific to the HP/Motif Widgets that datebook is built from. 

datebook.BitmapPath:
Specifies the directories to look in to find bitmaps used for the event classes. The default path is "/usr/local/include/X11/bitmaps".

datebook.showDayNames:
Indicates if daynames are to be shown the calendar window. Default is yes.

datebook.showClock:
Indicates if clock is to be shown the calendar window. Default is yes.

datebook.traversalOn:
Indicates if keyboard traversal is to be enabled in the text-edit widgets of the browser window.  If set to True then the mouse will no longer control the which text-edit widget gets the keyboard input but rather the highlighted widget will get all keystrokes until one of the keyboard traversal keys is used.  Cntrl Next is the standard way to traverse to the next widget.  In datebook the Return key will traverse to the next widget if the current widget can only hold a single line.  In addition the tab key will traverse to the next and Shift Tab to the previous widget. 

datebook.colorToday:
A boolean that indicates if the datebook.todayForground and datebook.todayBackground should be used to set the color of the button for today in the calendar window. 

datebook.todayForground:
Indicates the foreground (text) color of the button for today in the calendar window.

datebook.todayBackground:
Indicates the background color of the button for today in the calendar window. datebook.colorEvents: A boolean that indicates if the datebook.eventForground and datebook.eventBackground should be used to set the color of the buttons that represent days that have events.  Note that this variable does not affect the three dimensional look of the buttons which is always used. 

datebook.eventForground:
Indicates the foreground (text) color of buttons in the calendar window that have scheduled events.

datebook.todayBackground:
Indicates the background color of the buttons in the calendar window that have scheduled events.

One sample ~/.Xdefaults might look like:
 datebook.BitmapPath:                 /usr/include/X11/bitmaps
 # use a bigger font for the clock
datebook*clock*fontList:    ncenR18
 # color today yellow
datebook.colorToday:    yes
datebook.todayForeground:  black
datebook.todayBackground:  yellow
 # color event days a little darker than the rest
datebook.colorEvents:    yes
datebook.eventForeground:  black
datebook.eventBackground:  MediumSlateBlue
 # some overall colors
datebook*topShadowColor:              #B0D0FF
datebook*Foreground:                  White
datebook*Background:                  SlateBlue
datebook*bottomShadowColor:           DarkSlateBlue
 # Menus
datebook*menub*background:SteelBlue
datebook*menu*Background:         SteelBlue
datebook*menu*bottomShadowColor:  MidnightBlue
datebook*menu*topShadowColor:     LightSteelBlue
 # the static text areas
datebook*XmLabel*Foreground:         Yellow
 # Places where you can type
datebook*XmText*Background:         MediumSlateBlue
datebook*XmText*topShadowColor:     LightSteelBlue
datebook*XmText*bottomShadowColor:  MidnightBlue
 

 

Date SPECIFICATION

 
The date specification for Datebook can take many forms. The simplest form is a single date. Periodic events can also be specified using some of the more advanced constructs. (The exact syntax is covered the the datebook(4) man page.)
 
Some sample date specifications are:
 

March 18, 1989
2 weeks before 12/25/89
3rd weekday during 12/89
1 month after yesterday
October 10
Monday
2nd Tuesday
Aug 1 - Aug 5
Tuesday and Thursday between Jan 1 and Mar 15
Thursday after January 19
Everyday
Everymonth 5
Tuesday except April 25
Every 2nd Tue starting 26 December 89

 
The first four will be single events, the rest will be repeating events.
 

SEE ALSO

datebook(4), calendar(1), cron(1)
 
 

  —  February 15, 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026