home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
cal29a.zip
/
cal.doc
< prev
next >
Wrap
Text File
|
1993-07-17
|
7KB
|
164 lines
CAL display a calendar version 2.9
SYNOPSIS
cal [options] [[num_month] year] (numerical arguments)
cal [options] [word_month] [year] (verbal month argument)
DESCRIPTION
Cal is an enhanced version of the unix cal command. It is compatible to
the unix version in that it uses the same input arguments and its output
may be piped or redirected anywhere.
Cal displays a calendar for a specified year, a specified month and year,
or for the current date. By default, it displays a calendar for the current
system-date month, with the current day hilighted. It correctly handles the
transition from the Julian to Gregorian calendars in September 1752.
ARGUMENTS
A verbally-specified month may be entered without specifying a year in the
argument list; however, a single numerical argument will be interpreted as
a year. Only the first 3 characters of the month name are significant for
a verbally-specified month. The command `cal 10' refers to 10 AD, not
October, and not 1910.
The options are explained more fully in the ENHANCEMENTS sections below.
The available options are:
--nod[ata] - Do not try to read any appointment data file.
--d[ata-file]=filename - Read appointments from `filename'
(default appointment data filename is cal.dat).
You may use --d to 8 times, in a commandline,
to specify multiple data file names.
--f[uture] - If current month is displayed, then show only
future appointments from the appointment file,
not appointments that are past.
NOTE: This switch was -d in previous versions.
--e[urope] - Use European format (1st weekday is Monday)
--m[axappts] - Maximum number of appointments to display.
Minimum is 8, maximum is 50, default is 24.
--noc[olor] - Inhibit the use of colors.
--c[olor-file]=filename - Read color definitions from `filename'
(default color filename is cal.col)
COMMAND EXAMPLES
cal --f --d=my_dates display the current month and future
appointments defined in file `my_dates'
cal 1996 display the entire year of 1996
cal 9 1752 display the month of September 1752
cal sep 1752 same as above
cal January display January of the current year
cal help help message displayed for unrecognized arguments
ENHANCEMENTS OVER STANDARD `CAL' COMMAND
If displaying the single-month format, cal will look for a file called
cal.dat (or whatever you specify with the --d option) in the current
directory and then in cal's directory of origin. If found, cal will read
the file, looking for special date descriptions for that month which will
be displayed to the right of the calendar. 24 (adjustable default)
appointments may be displayed per month. If the current date happens to
fall on one of these special dates, it will be flagged by an asterisk. If
there is room, appointments for the next month may also be displayed (next
month's dates having definitions like "2nd Thursday" will be skipped).
The special date descriptions specified in cal.dat are single lines,
formatted as follows:
YYYY MM DD NW xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Where
YYYY is the year,
MM is the month (01 - 12),
DD is the day (00 if the NW field is used),
NW is the weekday-of-month code (00 if the DD field is used)
xxxx... is the message, if longer than 50 characters it will be truncated.
The data MUST occupy the character fields as shown. If YYYY is specified
as -999, the month and day are assumed to be annual events such as holidays,
and the description will be displayed for any year. If MM is specified as
-9, the day is assumed to be a monthly event for the specified year. In the
weekday-of-month code NW, N signifies on which weekday W the special date
occurs. For example, 31 indicates the third sunday. Values of W range from
1 to 7, for Sunday to Saturday, respectively. A value of 9 for N indicates
"last" as in 95 for "last thursday."
NOTE: If cal is invoked with the --europe switch, then the W values 1-7
denote Monday(1) to Sunday(7) rather than Sunday(1) to Saturday(7).
A line in cal.dat must start with -999 or a 4-digit number to be considered
as data. The data lines may be in any order. All these appointments will
be displayed in chronological order, regardless of the ordering in the
appointment data file.
The --f commandline switch causes any date description older than today's
date to be ignored, thereby giving room for other descriptions with future
dates to be displayed. As time progresses through the month, old
descriptions are discarded and newer ones are used. The --f switch affects
only the display for the current month, and not other months.
ENHANCEMENTS SPECIFIC TO MS-DOS and OS/2
Cal modifies the display attributes behind its output in order to display
the calendar in attractive colors. Display manipulation is not done if
cal's output is redirected somewhere else. When cal starts up, it looks
for a file called cal.col (or whatever you specify with the --c option),
first in the current directory, and then in cal's originating directory.
The colors have defaults if the file is not found.
Example of a color definition file:
15 02 video colors for month name
01 03 video colors for weekday header
07 01 video colors for normal calendar days
13 01 video colors for sundays
14 02 video colors for current day
07 06 background color for yearly calendar (the space between months)
11 00 video colors for special day descriptions
12 08 video colors for asterisk indicating that a description=today
FG BG
Color definitions must appear as above, as a two-character field for the
foreground color, followed by a space, folowed by a two-character field for
the background color. The color definitions must start on the first line,
and must not contain blank lines. Comments may appear after the second
field, provided that the total line length does not exceed 80 characters.
Possible colors:
black 0
blue 1
green 2
cyan 3
red 4
violet 5
orange 6
light gray 7
dark gray 8
bright blue 9
bright green 10
bright cyan 11
bright red 12
bright violet 13
yellow 14
white 15
Specifying a background color from 8 to 15 will result in a background
color of 0 to 7, with flashing text.
AUTHOR
Alex Matulich - uucp: alex@bilver.uucp
internet: alex%bilver@peora.sdc.ccur.com
alex@bilver.oau.org
fidonet: 1:363/140, Alex Matulich
...with enhancements and modifications by other contributors.
(c) 1992 by Unicorn Research Corporation. All rights reserved.
Inspired by an Amiga program by Gary L. Brant.