home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
APPT.ZIP
/
APPT.DOC
< prev
next >
Wrap
Text File
|
1990-06-19
|
6KB
|
127 lines
NAME
appt - display an appointments calendar
SYNOPSIS
appt [weeks] [-weeksback] [-current or -all] [source-file]
DESCRIPTION
Appt reads in the source file (APPT.DAT is the default), compiles
it into calendar form and displays a portion of the calendar on the
standard output. If a positive number (greater than zero) is given
on the command line, that is taken to be the number of weeks of the
calendar to show (default is 2, unless the environment variable
APPTLENGTH is set, in which case its value is used instead as the
default calendar length, again in weeks). A non-positive number
(less than or equal to zero) specifies the starting point of the
output in number of weeks from current (default is zero). So the
command "appt cal -2 3" would print out three weeks worth of
appointments starting two week ago and going through the current
week (the displayed calendar always starts on a Sunday). Note that
the order of the command arguments is arbitrary.
An entry in the source file is of the form "month/day <time>
[repeat] ;message" or "daylist <time> [which] ;message" or simply
";message". The characters <,>,[,] and ; are part of the entry and
must be included (see examples below) if the time or a repeat
factor are desired.
In the first case, month may be the numbers 1-12, the names
"january" - "december" (or nonambiguous abbreviations) or '*',
which means every month. Similarly, day may be the numbers 1-31,
'*', or '$', which means the last day of the month. Thus, '*/$'
means the last day of every month. Time is in 24 hr time, and is
optional. Some sample times are '<15>', '<15-18>', 1:15-1:45am, and
3:15-3:45am. Note that it is also possible to use <11am-1pm> and
<11Am-1:00pm> to specify 11:00am to 1:00pm. Repeat indicates to
repeat the message every n days in the listed months, where n is a
number optionally followed by a comma-separated list of months (see
examples below). The months, if present, are given by name, not
number. The repeat field may be omitted. It is useful for payday,
as in "1/4 [14] Pay Day!!!", which says that every 14 days after
Jan 4 is a pay day. Message is any length message beginning with a
semicolon (the semicolon is not displayed on the printed calendar).
Any words longer than 10 letters will be truncated, however.
The second form is of particular use for holidays. A daylist is a
comma-separated list of days or '*' which means every day. A day is
any unambiguous representation of a day of the week (ambiguity is
shared between month names and week- day names). 'T' for example,
would be ambiguous, but month names. Time is the same as above.
'Which' can specify which day of the month this message should be
shown. For Thanksgiving, the 4th Thursday of Nov, the entry could
be "Th [nov,4] Thanksgiving" or "thur [fourth,no]". The message
field is the same as above, also.
By default, appointments which have expired (their ending time, if
given, has already passed) are not displayed. You may override
this by one of two ways: define an evironment variable named
"APPTALL" set to anything, or specify the "- all" flag with the
command. If you have "APPTALL" defined but for some reason do not
want old appointments shown, use the "-current" flag on the command
line. If more than one "-all" or "-current" is given, the last one
specified is used. A weeksback flag implies an "-all" flag (which
may be overridden by subsequent flags).
An entry containing only a message (prefixed by a semicolon and
ended with a newline) is treated as a comment and is not dislayed.
Whitespace (spaces, tabs and newlines) is generally ignored by
appt, except in messages.
Syntax errors are reported. Semantic errors, like scheduling an
appointment for the 7th thursday in month 13, are also diagnosed.
EXAMPLES
Here is a short .appt file:
;******Birthdays*******
10/28 ;Adam's Birthday
7/1 ;Rita's Birthday
;******Holidays********
mon [May,last] ;Memorial Day
Sund [May,2] ;Mother's Day
july/4 ;Fireworks
12/25 ;Christmas
* [last,june] ;Vacation
;******Anniversaries****
7/14 ;Jim and Chris' Anniv.
;****** Business *******
1/10 [14] ;Pay day!!
1/17 [14] ;Pay day w/P.S.!!
Wednesday <14> [first] ;Meeting with group
Thursday [3,jun,dec] ;Semi annual profit share check
3/7 <8-930> [7,mar,april] ;strategy meeting
;***** Miscellaneous ***
*/$ ;Make house payment
*/15 ;House payment due!!!
*/26 ;Car payment
tuesday <1930> ;Recorder group practice
monday,wednesday,friday <16-19> [sept,oct,nov,dec] ;AI class
FILES
APPT.DAT
DIAGNOSTICS
If it cannot find a file to read from it will complain. Syntax
errors are diagnosed and zeros used to fill in missing quantities.
No guarantees on calendar accuracy if there are syntax or semantic
errors. In fact, there are no guarantees at all for this program.
AUTHOR
Jonathan W. Krueger
Ron Bemis - conversion to VAX/VMS
Ron Bemis - conversion to IBM PC
Ron Bemis - conversion to OS/2
BUGS
Are you kidding? They're all FEATURES!