home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / CMDS / cal.lzh / docs.vpt < prev    next >
Text File  |  1995-02-26  |  11KB  |  244 lines

  1. .* This file can be processed with Vprint to get a manual. Note that the file
  2. .* docs.txt has already been processed and can be listed to a 66 line/page
  3. .* printer.
  4. .
  5. .lf=c
  6. .hd65=\twPage \\#p\tw
  7.   ****            **            ****   
  8.  **  **          ****            **    
  9. **              **  **           **    
  10. **              **  **           **    
  11. **              ******           **   *
  12.  **  **         **  **           **  **
  13.   ****          **  **          *******
  14.  
  15.  
  16. Calendar Generating Program
  17. for
  18. OS9/68000
  19.  
  20. Copyright 1995
  21. Bob van der Poel Software
  22.  
  23. N O T I C E
  24. -----------
  25. .lf=l
  26.  
  27. This software is protected by copyright. It is offered on an "as is" basis. Under our shareware agreement you have no obligation to register the software. However, if you like it you should send in the requested contribution. If you do not wish to register the software, please delete the program from your system.
  28.  
  29. If you like this software we ask that you complete the enclosed registration form and mail it to us with a $20.00 fee. In return we will send you the latest version of CAL, our latest catalogue and a $10.00 certificate redeemable on any of our commercial products.
  30.  
  31. You are free to redistribute this software by any means. However, you can not change any of the files you received in the original package. You can not charge any fee for distributing the package.
  32.  
  33. .lf=c
  34. Introduction
  35. ------------
  36. .lf=l
  37.  
  38. CAL is a program which will print out calendars and remind you of holidays and appointments. It is easy to use and can be configured to printout in various formats and to the printer or screen. CAL will accept any date; however, you should be aware that because the current calendar has not always been in use, dates prior to 1753 will be mythical at best.
  39. .pg
  40. .lf=c
  41. Command Line Options
  42. --------------------
  43. .lf=l
  44.  
  45. If you just type "cal" at an OS9 prompt you will get a printout of calendars for the last, current and next month. This is CAL's default operation. However, there are many ways to change the defaults. The changes are done via command line arguments. Each argument must be prefaced with a '-'. You can concatenate several options together, so long as none of the intermediate arguments do not need an argument. For example:
  46.  
  47.     cal -m10
  48.  
  49. will display a calendar for November of the current year. And:
  50.  
  51.     cal -gm1-12 -y1994
  52.  
  53. will display calendars for each month in 1994, with the graphics characters turned off. In both cases, the calendars will be displayed three wide. We assume that you have an 80 column display (don't worry...you can change that!). However, if you try this:
  54.  
  55.     cal -m1y1995
  56.  
  57. the "y1995" will be ignored.
  58.  
  59. For each command option which needs a parameter, you can use an option "=". However, using the "=" or not, you must not have any spaces between the option name and the parameter. For example:
  60.  
  61.     cal -m=12
  62.     cal -m12
  63.  
  64. Are identical. However:
  65.  
  66.     cal -m 12
  67.  
  68. will not work.
  69.  
  70.  
  71. Each of the various command options will now be explained:
  72.  
  73. .id=5
  74. -b  This flag enables printing in "big" format. This format is very nice to use on a printer (you'll never have to line up at the bank again in the new year). Rather than trying to explain the format here, just do a "cal -b" to see the results.
  75.  
  76. .id
  77. -c[=]value  This command can be used to set the number of calendars to print. For example, if you use the command line:
  78.  
  79.     cal -m1 c4
  80.  
  81. you will get calendars for January, February, March and April. Of course, you could get the same results with the command:
  82.  
  83.     cal -m1-4
  84.  
  85.  
  86. .id
  87. -g  This flag will disable the use of 8 bit, IBM graphics characters when printing the calendar. Most terminals and printers now support this character set; however, some don't...so it is an option.
  88.  
  89. .id
  90. -h[=][path]  Normally, holidays are not printed. However, you can print them with this flag. The format of the holiday file is detailed later in this document. If you simply include the -h flag (without a filename) CAL will look for the holiday data file "/dd/sys/cal.holidays". If you wish to use a different filename, just place it after the -h. For example:
  91.  
  92.     cal -h=/h1/woof/myholidays
  93.  
  94. will look for the file "myholidays" in the directory "woof" on the device "h1".
  95.  
  96. .id
  97. -m[=]range  This option lets you specify the months to print. You can specify the range in a number of ways...again, a few examples prove the rule:
  98.  
  99.     cal -m=1-12        \idprints January to December
  100.     cal -m=4        \idprints April
  101.     cal -m-12        \idprints from the current month to December
  102.  
  103. If you specify a range and the second value is less than the first, the second will be used for the next year. For example:
  104.  
  105.     cal -m12-1 -y1995
  106.  
  107. will display calendars for December 1995 and January 1996.
  108.  
  109. .id
  110. -oe[=]str  This option sets the codes which enable overstrike mode on your printer/terminal. It is used to print the dates of the month when doing a "big" calendar. The definitions for the "str" are detailed later in this document.
  111.  
  112. .id
  113. -os[=]str  This option set the codes with disable overstrike mode. It is used when printing the dates of the month when doing a "big" calendar.
  114.  
  115. .id
  116. -p[=]path  Normally, the printout is done to standard out (your terminal). You can change this by using the -p option. For example:
  117.  
  118.     cal -p=/p
  119.  
  120. will print the calendar to the device "/p" (normally, a printer). Of course, you could do the same with a redirect command (such is the flexibility of OS9).
  121.  
  122. .id
  123. -se[=]str  When printing in "big" mode, this string is printed at the start of the calendar. See later in this document for the details on "str". Also, see the example "cal.init" file.
  124.  
  125. .id
  126. -ss[=]str  This string is sent at the end of "big" calendar. Useful to undo the effects of "-se".
  127.  
  128. .id
  129. -u[-][path]  You can use initialization files with CAL. Normally, they are not used (which leaves CAL in the default mode). However, an init file is very useful when doing printouts to the printer, etc. If you call CAL with:
  130.  
  131.     cal -u
  132.  
  133. the file "/dd/sys/cal.init" will be read. The format of this file is quite simple: it is just a collection of command line options. Each line in an init file can:
  134.  
  135.     - \idstart with a "#" or "*". These are comment lines and ignored.
  136.     - \idbe blank. These are ignored.
  137.     - \idstart with a "-" and have a legal command line option. These are interpreted just like a command line option.
  138.  
  139. Following is a copy of the init file we use on our system (the numbers have been added and MUST NOT appear in your file).
  140.  
  141.     1 \id* cal.init
  142.     2 \id* This assumes a printout on a laser.
  143.     3
  144.     4 \id# Set the session start string for reset, landscape, 12 cpi
  145.     5 \id-ss=\x1bE\x1b&l1O\x1b(s12H
  146.     6 \id# Session end string = reset
  147.     7 \id-se=\x1bE
  148.     8 \id# printout width = 132 columns
  149.     9 \id-w=132
  150.     10 \id# use big format
  151.     11 \id-b
  152.     12 \id# printer name
  153.     13 \id-p=/p
  154.     14 \id# include holiday information
  155.     15 \id-h
  156.     16 \id# overstrike on/off strings for date number emphasis
  157.     17 \id-os=\x1b(s3B
  158.     18 \id-oe=\x1b(s0B
  159.     19 \id##### end of cal.init #####
  160.  
  161. Lines 1 to 4 are comments/blank and are ignored, lines 5 and 7 set the session start strings, line 11 enables "big" format, etc.
  162.  
  163. You can have many init files and specify the one to use with the -u option. For example:
  164.  
  165.     cal -u=/h1/woof/myinit
  166.  
  167. will cause the file "/h1/woof/myinit" to be read.
  168.  
  169. It is important to note that options are read in the order read. For example, if you have "-p=/p" in your init file and use the following command line:
  170.  
  171.     cal -u -p=/p1
  172.  
  173. the printout will go to "/p1"; not "/p". This behaviour can be exploited to override default setting in an init file. Just place the new settings after the -u flag.
  174.  
  175. .id
  176. -w[=]value  This option changes the width of the printout. By default, CAL assumes an 80 column device.
  177.  
  178. .id
  179. -y[=]range  This option set the range of years to print:
  180.  
  181.     cal -m1 -y=1888            \idprints a calendar for January 1888
  182.     cal -m1 -y1995-1996        \idprints a calendar for Jan 1995 to Jan 1996
  183.     cal -y-1997                \idprints a calendar from the current month to
  184.                             \idthe current month in the year 1997
  185.  
  186. .il=0 pg
  187. The HOLIDAY File
  188. ----------------
  189. .lf=l
  190.  
  191. If you wish holidays to be printed with a calendar, you must include the "holiday" file. This is automatically done, assuming that the file is "/dd/sys/cal.holidays". If you wish to use a different path you can specify the file (eg. -h=/dd/sys/cal.woof).
  192.  
  193. Each line in the holiday file can be a comment or specify a holiday. Blank lines are ignored.
  194.  
  195. Comment lines start with a "*" or a "#".
  196.  
  197. Holiday date entries start with a date, followed by a description. The description must be separated from the date by one or more spaces or TAB characters.
  198.  
  199. A date can be specified in a number of ways:
  200.  
  201. 1. \idAs an absolute date. In this case just start the line with the month number and the day number separated with a "/". For example:
  202.  
  203.     1/1     New Years
  204.     12/25    Christmas
  205.  
  206. 2. \idAs a specified day in the month. For example, the first Monday of February or the Last Thursday in June. To specify a date in this manner you need the month, followed by the digit "1" to "4" or an "L" (or "l"), followed by enough of the letters of the day name to be unique. Again, examples prove the rule:
  207.  
  208.     5/2Sunday    Mother's Day
  209.  
  210. This specifies the second Monday in May.
  211.  
  212.     6/3Sun        Father's Day
  213.  
  214. This specifies the third Sunday in June.
  215.  
  216.     9/1mo        Labor Day
  217.  
  218. This specifies the first Monday in September.
  219.  
  220. 3. \idAs a day of the week preceding a specific date. For example, Canadian Victoria day is the Monday before May 25. This is set with a full date as in (1), followed by a "-" and a day name. For example:
  221.  
  222.     5/25-monday        Victoria Day
  223.  
  224. In this example, "5/25-MO" would work just as well.
  225.  
  226. 4. \idAs a day of the week following specific date. We are not aware of any holidays of this nature, but to specify the Sunday following the November 1, you would use:
  227.  
  228.     11/1+SUN        Special Day
  229.  
  230. 5. \idAs an offset from Easter Sunday (or just Easter without an offset). This is needed for dates like Palm Sunday, Easter Monday, etc. The syntax for this is simply the word "Easter" followed by an optional "+" or "-" and a value. Examples:
  231.  
  232.     easter-7    Palm Sunday
  233.     easter-2    Good Friday
  234.     Easter        Easter Sunday
  235.     easter+1    Easter Monday
  236.  
  237. A final, useful, option in a holiday file is the include directive which includes another file. To include a file, use the word "include" at the start of the line followed by a valid pathname. For example,
  238.  
  239.     INCLUDE /dd/sys/birthdays
  240.  
  241. Would include a birthday file. Note that the pathname is relative to the current data directory, not to the directory where the original file is located.
  242.  
  243. When the included file is finished, processing will continue in the original file. You can nest includes up to the limit imposed by the operating system (32).
  244.