home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
bbs
/
today199
/
todays.doc
next >
Wrap
Text File
|
1992-04-25
|
48KB
|
923 lines
Version 1.99 04/24/92
TODAYS.PRG
A program to display events and occurrences on a date in history
Original program by
Mike Butler
This Atari ST version by
Chuck Grimsby
Hello out there in FREEWARE-land! It's me once again, with
another program. Or rather, another version of a program!
This program has a rather curious history. In about 1987 or
1988, one of my favorite BBSs (The FlightLine BBS (612-544-5118) 24
hours, 365 Days, 300/1200/2400/9600/14.4 Baud HST/V.32) ran a
program that created a "Welcome" message to it's users that listed
what happened on that date in history. It was a nice program, but
from time to time it would "hiccup" and strange things would happen.
After watching these "hiccups" for a while, I finally got fed up and
decided to do something about it. I tried to find a copy of the
program through the 'normal' sources (BBSs, GEnie, CompuServe, etc.)
but I couldn't find it. Finally, I requested, and got, a copy of
the program and it's data files from the SysOp of that BBS. There
wasn't any documentation with the programs, but I proceeded to
"reverse-engineer" the data files to create a program that was a bit
more stable. TODAYS.TOS version 1.01 was the result.
After releasing that version to the general Atari ST public, I
started getting requests, make that REQUESTS, to "enhance" the
program. For a while, I granted the requests and I was releasing
new versions darn near weekly. Then I got bored with it and moved
on to other programs. Late in 1991, I started thinking of the
program again, got out all those old enhancement requests, added a
few of my own ideas, and started working on it.
Well, that's my history with the program. The history of this
program's concept is even older, and stranger, then that! Someone
(sorry, I lost the person's name) was kind enough to E-Mail me a
copy of the IBM/PC version of TODAY complete with docs! (No version
of the ST program I've ever seen has had any documentation with it!)
As it turns out, this program goes way back to the days before there
were home computers, only main frames!
According to the information I now have, It was originally
written by Mike Butler in PL/1 on a VM/CMS system. He should
receive all the credit for the data file format, and for most of the
data in the files as well! (You'll note a _strong_ San Francisco
"flavor" to the files. I assume that's where Mike Butler is or was
when he wrote them.)
The two Atari ST versions of the "TODAY.TOS" (note that the
word "today" is singular) programs I've seen were written by John
Nastasi.
This program retains _most_ of it's compatibility with earlier
versions, and even with versions on other computers, however this
program is HEAVILY enhanced and may use the data files in ways that
other versions on other computers do not. To put it another way,
"This program maintains DOWNWARD compatibility, but not necessarily
CROSS compatibility!"
SET UP
Before you begin, you'll need to get a copy of the data files
from somewhere. They are fairly easy to find. Both GEnie and
CompuServe have them in both their IBM/PC and Atari ST areas.
Simply do a search for the word 'TODAY' or 'HISTORY' in those areas
and you'll find them. NOTE: Many other programs of this type use
similar data structures and can be easily converted over. See the
section on DATA FILES for the format of the data files.
I don't distribute them with this program as once downloaded,
there's no need to do it again.
Feel free to make up your own (or add to those you already
have) by following the format laid down in the DATA FILES section of
this document.
OK, now that you've got some data to work with, you'll need to
set up a file to tell the program what to do. This file should be
named TODAYS.INF and can be created with any word processor or text
editor that can save ASCII documents. Take a look now at the
TODAYS.INF file that was included with this distribution package.
The first line is the path for the program to use to find the
data files, that is to say the TODAY.mmm monthly files TODAY.LNG,
TODAYS.HDR and the TODAYS.RPT file. The TODAY.mmm files are the data
files I mentioned above. As for the other files, well, at this
point, don't worry about them. I'll tell you all about them as we
go on. Just be aware that this is the path the program will look
for it to be.
Line 2 is for any 'additional' files you'd like the program to
look at. You only put the extender of the file name on this line,
not the whole filename and path! The program will look for a file
named "TODAY.xxx" (where xxx is the extender) in the path set on
line 1.
As an example, if you have two additional files you want the
program to go through named 'TODAY.HOL' and 'TODAY.MUS', this line
would be:
HOLMUS
Note that there's no periods or spaces between the extenders!
You may have as many extenders on this line as you want, of
course. This is just an example of how it would look if you had only
two.
Note to users of older versions: In versions before 1.97 the
program had a 'TODAY.HOL' file hard coded into it. That's gone with
version 1.99. If you still wish to use a HOLiday file, place the
extender of the file on this line. Otherwise it won't be read.
Note to new users: To make it easier to update holidays that
move around from year to year, it is suggested that you put all
those holidays into a 'TODAY.HOL' file and put that file in the same
path with the TODAY.mmm monthly files, and place HOL on line 2. You
are not required to do this, but it is suggested. The reason I
suggest it is that when it comes time to update those movable dates,
it sure is a heck of a lot easier to change them if they're in their
own file, rather then scattered around the 12 TODAY.mmm files.
(Talking from personal experience...) If you choose to use a
HOLiday file, don't forget to put the HOL extender on line 2!
Line 3 is for an "Alternate file" if you want to use one. If
you'd rather have all your data in one huge file, leave lines 1 and
2 blank and put the location and name of your one huge file here.
If you're not using an "alternate file", leave this line blank.
Note: You may use both the TODAY.mmm monthly files, AND the
'alternate file' if you wish. Simply fill out lines 1 and 3!
You can also use all three options, the TODAY.mmm monthly files
on line 1, the 'additional files' on line 2, and the 'alternate
file' on line 3 by simply filling out all three lines!
Line 4 is for where you want the output from the program to go.
This can be a file on a disk somewhere, as shown in the sample
TODAY.INF file included with the distribution package, or to the
screen (use the word "CON:" if you want that but with out the
quotation marks), or "PRN:" if you want it to go to the printer
(again without the quotation marks).
Line 5. If you've got some text that you want to show up
before the data that TODAYS.PRG creates, put that into a text file
and put the path and name of that file on this line. TODAYS.PRG
will "copy" that over to where you've told it to put the output on
line 4.
Line 6 is for what you want the program to do with any file
that already has the same name as the output file. REPLACE or
APPEND are your only options. (The program defaults to Append if it
can't understand what you put there.)
Line 7 is for an "Age value." The Age Value is used during
calculated dates. We'll get further into this later. If you've no
idea what to put here now, just put a zero (0) or leave the line
blank.
Line 8 is another value, but this line is for the "Wrap Value."
If you have lines that are too long to fit on a 80 column screen in
your data files, TODAYS.PRG will perform a "word wrap" function on
the first space before the column you specify on this line. Again,
if you'd prefer the program not wrap your lines, leave this line
blank, or place a 0 on this line. 0 is the only number less then 20
that this program will recognize, so if you try and place something
absurd like 5 on this line, it'll just be ignored and no word wrap
will be performed. (Yes, you can do 20 column word wrapping. Why
someone would want to is beyond me, but so be it. 70 to 80 columns
makes more sense.) Using a "Wrap Value" assures that everything
will line up nicely when it's printed out.
Line 9 is for the Carriage Return code. Some users have
requested that 'hard' returns be used instead of 'soft' returns.
The codes on this line need to be the ASCII values, and each value
must be 3 characters long. To do 'hard' returns, for example, on
this line you should have:
013013010
This will give a 'hard return' which is usually two Carriage
Returns and one Line Feed character. (Normally, it's just one
Carriage Return and a line feed.)
To do 'soft' returns, which are the standard returns on most
computers, on line 9 you should have:
013010
BBS SysOps take note: On some computers, and with some
terminal programs, use of 'hard' returns can cause what looks like
double spacing on the user's screens. What's happening is that the
Carriage Return character causes the program to _assume_ a Line Feed
and thus the double space. The Line Feed itself is 'filtered' out.
If you get reports of double spacing in the TODAYS.RPT file from
your users, switch back to using 'soft' return codes by deleting one
of the 013's on line 9.
As always, you may use any other type of code on this line that
you wish to use. VT-52, VT-100, ANSI, TX2, IGS or whatever. Just
use a ASCII chart to convert the characters over to their decimal
value. Just make sure all the values are three characters long!
(Use leading 0's to fill out the value if it's under 100)
Line 10 is to tell the program whether or not it should sort
the data it collects for this run. Each "group" or type of data is
sorted separately. Sorting helps if you want the display to come
out in order and your data files are not sorted. Your only options
here are either "SORT" or "NO SORT" (without the quotes). The
program defaults to NO SORT if it can't understand what you put
here.
Note: Calculated dates are ALWAYS sorted regardless of what is
on this line. You'll read more about Calculated dates later.
Line 11 is for those of you who want to know where the data is
comming from for this program. If you put the word SHOW as the
first word on this line, the program will add to the end of each
line a number you can use to indicate what data file the program got
this line from. This is useful when looking for duplicate entries,
though I don't suggest you leave it on all the time. The number
will be enclosed by parentheses "()" so it won't be confusing if you
have other numbers on the line.
Numbers 1 through 12 are the months of the year, of course, and
correspond to the data file for that month. Numbers above 12
indicate the additional files you told the program to read on line
2. These are files are read in order, left to right, and are
numbered 13 through however many files you have on line 2.
If you've specified a 'alternate' file on line 3, the number
this file receives will be the next number up. If you've left lines
1 and 2 blank (a 'one big file' user) this file will be numbered 13,
since that's the next number up.
For those of you who have LOTS of data, you may want to use the
the word SHOW2 instead of SHOW on this line. When SHOW2 is used,
you'll not only get the number of the file, but the line number
within the file that the data came from. The line number will be
enclosed in brackets "[]". This helps in the elimination of
duplicate lines. (When you have a LOT of data this can be a BIG
help!)
Placing SHOW3 on this line gives you the same information as
SHOW2 plus a number enclosed by {}'s that is a indication of where
it is in the data collected. This really has no value to anyone
except the programmer (me!). I use it for debugging. ("Ok, now why
did that line come out now?!?!") I thought I'd let you know about
it though, just in case someone else can find a use for it.
Placing SHOWA on line 11 gives you ALL the above, plus a list
of the options you've told the program to use. This is useful if
you don't get what you asked the program to give you in terms of
paths, files, and options.
Line 12 is for the maximum number of items you want (or will
allow) TODAYS.PRG to collect. The smaller this number is, the fewer
items will be collected, and the less memory the program will use.
For most users, 1000 will suit you well, and will fit into a 512K
machine. Even 2000 should fit, however that will depend on what
other programs and ACCs you have running. Basically, if you
encounter a 'Out of Memory' error, (TOS code -39 or GFA code 8),
then you'll have to lower this number.
And that completes the TODAYS.INF file.
TODAYS.HDR
NOTE: You may want to read the section on DATA FILES before
reading this section.
Before you go on, you need to make some decisions. The
original TODAY.TOS program, upon which TODAY.PRG is based, forced
users to have 3 types of data: Reminders, Special Events, and
Birthdays. TODAYS.PRG allows you to have as many as 256 different
types of data!
If you've downloaded the TODAYDAT.LZH file, you'll discover
that all the data in those files are 'broken up' into those same
three types: S for Special events, B for Birthdays, and R for
reminders. Personally, that's a bit too limited for my tastes. I'd
rather have Weather related events comming out under their own
'header' rather then all mixed in with the Special events, and same
goes for National Holidays, and so on. So what I did was to sit
down and set up my own set of 'types' of data. Weather should go
under C (for Climatology), National holidays should go under N,
Deaths under D, and so on and so forth.
Next, I fired up my Word Processor and created my TODAYS.HDR
file following the rules outlined below:
1) The first character on the line tells TODAYS.PRG what type
of data the line is for.
You can make the code whatever you want it to be, however
note that "type codes" are case sensitive! A 'z' is NOT the same as
a 'Z' to TODAYS.PRG. There are four types that are hard coded into
the program that CANNOT be used as type codes:
$ is for Anniversary events,
^ is for Friday the 13th stuff,
# is for Calculated days, and
* is for 'Ignore this line'.
You should also be aware that can't use a type code '%' either.
There isn't a hard coded type %, but the percent sign (%) means
something special to the part of the program that interprets your
report format. Again, you'll read more about that in the REPORTS
section of this document.
2) The rest of the text on the line, from position 2 on, is the
text, or actual header, that the program will display before it
displays the data for that type.
The first 2 lines also have a special meaning to the program:
Line 1 is for when the program can't come up with any data for
the date. This is referred to as the "NO DATA" line.
Line 2 is for Friday the 13th. This is figured out internally,
so your data files don't have to worry about it. If you don't care
about Friday the 13th, just leave this line blank.
The rest of the lines can be for whatever types you want!
Each line may contain any VT-52 or VT-100, or whatever codes
you care to put in there.
There are two ways to make a multi-line header. You can either
declare 2 lines as having the same type code (they are displayed
from top to bottom) or you can use a "pipe" character (|) in the
string. TODAYS.PRG will replace the | character with Carriage
Return you told the program to use on line 9 of the TODAYS.INF file
when it is printed out.
Your lines will *NOT* be automatically centered, or adjusted
right or left. If you want the line centered when it prints out,
you will have to center it in the TODAYS.INF file.
NOTE: You don't have to have 'header' lines except for the two
I mentioned above for No Data and Friday the 13th. In fact, you
really don't have to have those either!
If you'd rather not know that you don't have any data for the
run, or if you can figure that out from the lack of data printed,
simply leave line 1 blank. (Have the line there, just don't have
anything on it!)
The same goes for the Friday the 13th 'header' on line 2. If
you'd rather have that in your data files, or if you don't care
about Friday the 13th, simply leave line 2 blank.
TODAYS.LNG
The TODAYS.LNG file contains the 'language' or words that the
program will use for things like the day of the week, the names of
the months, the time of day, numbers, etc.
It also contains the words TODAYS.PRG will use in error
messages, should it need to give one. You may edit this file as
much as you like, however: DO NOT CHANGE THE ORDER! (Things will
get _really_ messed up if you do!)
For those of you who would rather have the text come out in
French, German, Spanish, or whatever, here's where you make those
changes.
The only 'tricky' thing about the TODAYS.LNG file is that it'll
only use the data from the leftmost edge of the line to wherever
you've put a 'pipe' character (|). Anything after that is ignored,
so feel free to make whatever comment after the pipe you wish.
NOTE: Since the way other languages work for converting
numerical symbols to words is different from English, I can't make
any sort of guaranty that the routine I use in this program will
work, but feel free to give it a shot!
ALSO NOTE: If you change the names of the months in the
TODAYS.LNG file, you'll also have to change the names of the
TODAY.mmm monthly files. TODAYS.PRG gets the names of file to read
by using the three leftmost characters of the month names in
TODAYS.LNG.
TODAYS.ERR
If TODAYS.PRG can't understand something in either your
TODAYS.INF or TODAYS.RPT files, or if it can't find the files you
tell it to use, TODAYS.PRG will generate a report in the default
directory called TODAYS.ERR. This file will attempt to explain to
you what it found wrong.
I have to admit here that I didn't try to have the program
describe in detail every possible error that could occur, but it
does do things like codes it doesn't understand in your TODAYS.RPT
file, not being able to find the files you tell it to use, etc.,
etc.
When something goes wrong, your first response should be to
look for a TODAYS.ERR file. It'll help you fix 99.999% of your
problems.
DATA FILES
The file structure of the TODAY.mmm files is a simple, but
EXTREMELY efficient and effective one!
There needs to be a separate data file for each month, with the
extender being the 3-character name of the month. i.e. the January
file should be named TODAY.JAN, the February file TODAY.FEB, the
March file TODAY.MAR and so on.
Just to make sure, the extenders are: JAN, FEB, MAR, APR, MAY,
JUN, JUL, AUG, SEP, OCT, NOV, and DEC.
The program reads in these files according to what month the
system clock is set to. If the system clock is set for a day in
January the TODAY.JAN file is read, if it's set for a date in
February the TODAY.FEB file is read, and so on.
This program doesn't require you to put the data into any
particular order. If you want to separate out the birthdays from
the events and put them in chronological order feel free to do so.
TODAYS.PRG won't care WHAT order they are in!
All the TODAY.mmm data files follow the exact same format:
The first 10 characters on each line is data for the program to
use, the rest is information to be displayed.
Each event needs a separate line.
Each line can be as long or as short as you want it to be.
TODAYS.PRG will "wrap" the lines automatically for you. (This is a
feature unique to TODAYS.PRG. The versions on other computers don't
have it!) I tested it with a couple of 255 character long lines,
and it does quite well.
The first character on the line tells the program what type of
event this is. Although the original TODAY program only supported 3
types of events (B for birthdays, S for special events and R for
Reminders), TODAYS.PRG allows you to use whatever you want for your
data types, and however many you want! As I mentioned before there
are four exceptions to this that are hard coded into the program.
Those are:
* - Ignore this line,
$ - Anniversaries,
# - Calculated days, and
^ - Friday the 13th.
Remember as well that you can't use % as a type code due to the
way that the report generation routine works.
The next 4 characters (Columns 2-5) are for the month and day.
Both the month and the day are ALWAYS 2 characters long each! (i.e.
January 5th is 0105, February 9th is 0209, and November 21st is
1121.) You may use spaces instead of 0's as place holders if you
like, just remember that you *MUST* use either a space or a 0 to
make everything work right.
The next 4 characters (Columns 6-9) are for the year the event
or birthday occurred. In cases of holidays and repeating events such
as the American Independence Day (July 4th) the year isn't used, so
for Holidays these columns can be left blank. For years "B.C.", you
can use a negative number IF it will fit into these four columns.
Use either spaces or zeros as place holders if you need them for 3
or 2 digit years.
Columns 11+ are for whatever text you want displayed.
You may have noticed I skipped over the 10th column. The 10th
column is a "strange" one, but quite useful. Suppose you have a
holiday, like Thanksgiving for instance, that occurs ONLY on
Thursdays. In this case, a 5 should be in the 10th column.
(Thursday is the 5th day of the week.)
Memorial Day, which can only happen on a Monday, should have a
2 in column 10 since Monday is the 2nd day of the week.
Election days in the USA can only happen on Tuesdays, so a 3
goes in column 10.
Ash Wednesdays can only happen on Wednesdays, so a 4 goes in
column 10.
Good Friday can only happen on a Friday so a 6 goes into column
10.
Get the picture? Saturday Holidays get a 7 and Sunday holidays
have a 1 in column 10. (Did I get every day of the week??)
Additionally, if an Event takes two or more lines to describe,
you can put a C into the 10th column. This keeps the program from
printing out the year it happened. (Since TODAYS.PRG allows the use
of 255 character long lines, this is fairly rare, but to maintain
compatibility with older versions, and just in case, I left it in.)
One of the drawbacks with this method is that it requires a
line for every POSSIBLE date. Thus, since Mother's Day could happen
either on May 10th, or May 8th, or May 14th, or May 13th, or
whatever, you will have to have a separate line for each of these
dates, and for whatever other possible dates it could occur on AND a
1 in column 10 so that it will only show up on a Sunday.
CALCULATED DATES
The TODAYS.PRG program also supports six more functions that
the original TODAY program didn't. Nor, as far as I can tell, do
current versions on other computers. These I refer to as
"Calculated dates." Here's how they work:
If there is a asterisk (*) in column 10, the program will
calculate the number of days from the system date to that date. The
program will return with the number of days until that date, then a
space, then whatever text you have on that line. For example,
suppose in your TODAY.DEC you have the following line:
S1225 *More shopping days until Christmas!
On November 25th, the program will print out:
30 More shopping days until Christmas!
On December 16th, the program will print out:
9 More shopping days until Christmas!
Unfortunately, on December 26th, the program will print out:
365 More shopping days until Christmas!
If you don't want this line to printed out after the date has
happened, use a plus sign (+) instead of a asterisk (*) in column
10.
A minus sign (-) in column 10 gives the number of days SINCE
the date in columns 2-5.
Remember that "Age Value" on line 7 of the TODAYS.INF file?
Here is where it is used. If you have set a Age Value of 30 in your
TODAY.INF file, and you have a pound sign (#) in column 10 instead
of the asterisk (*), this line will only be printed out if today's
date is within 30 days of 12/25. It won't be printed out after that
date, or before 30 days before 12/25.
Placing a percent sign (%) in column 10 does the same as a #,
except instead of giving the number of day until the date, you get
the number of days since an event, until you hit the Age limit set
on line 7 of the TODAYS.INF file.
Placing a ampersand (&) in column 10 does the same as using
both the % and #. You get both the number of days until the date,
and the number of days since the date, as long as it's within the
range set with the Age value.
To review:
If there's a * in column 10, the program will always calculate
the number of days until the date to the next occurrence.
If there's a + in column 10, the program will calculate the
number of days until this date ONLY if the day hasn't come.
If there's a - in column 10, the program calculate the number
of days since this date, but only if the day's past.
If there's a # in column 10, the program will calculate the
number of days until this date if it's within the Age value.
If there's a % in column 10, the program will calculate the
number of days since the date, if it's within the Age value.
If there's a & in column 10, the program will calculate the
number of days until AND since this date if it's within the age
value.
Calculated dates are always sorted, regardless of what you have
in your TODAYS.INF file, so that they always come out in order of
occurrence, soonest ones first. To do this, and to save memory,
there's a built in limit of 50 dates that can be calculated. That
_should_ be enough for just about anyone.
ANNIVERSARIES
Type $ events are designed for anniversaries. When TODAYS.PRG
finds a $ in column 1 it figures out the number of years from the
year in columns 6-9 to the present and will print that out instead
of the year.
If you don't know the year, just leave that information blank.
The program won't do a calculation for the number of years, but will
still display the event.
If you have a line in your TODAY.mmm file that says:
$02021979 Years of marriage for Robin and Dave!
on February 2, 1992 out will come:
13 Years of marriage for Robin and Dave!
If you have a line in your TODAY.mmm file that says:
$0202 Robin and Dave's Wedding Anniversary!
on February 2, 1992 out will come:
Robin and Dave's Wedding Anniversary!
YEARLY, MONTHLY AND WEEKLY EVENTS
Through careful use of the month field (columns 2 and 3), the
day field (columns 4 and 5), the year field (columns 6-9) and column
10 (as the day of the week field), you can create lines that will be
displayed on every day of a year, every day of a specific month, on
a specific date of any month, on specific days of the week, or any
combination of the four.
It's best to set up 'categories' for these types in your
TODAYS.INF and TODAYS.RPT files. For these examples we'll use type
Y for Yearly events (a line to be displayed on every day of a year),
type ! for Monthly events (a line that will be displayed on every
day of the month) and type @ for our Weekly events (ones that will
appear only on specific days of the week).
YEARLY EVENTS
1992 is the Year of the Frog. Not really, but let's just
suppose it is. To set up a line in your TODAY.mmm files, you'll
first have to set up a Type category Y in your TODAYS.RPT file and
your TODAYS.INF file for type Y events. (In the Distribution files,
I've already done that, so you can just look at those files to see
how it's done.) Now, put in your TODAY.mmm files a line that says:
Y 1992 Year of the Frog
Now whenever TODAYS.PRG is run in 1992, you will get a line that
says:
"1992 - Year of the Frog"
as a part of the 'Yearly Events' listing.
If you only put this line in your TODAY.JAN file, this line
will only come out in January, 1992. If you put it only in your
TODAY.FEB file, it'll only come out in February, 1992. To have it
come out on every day of the year you'll either have to put it in
every TODAY.mmm monthly file, OR in one of the 'additional' files
you've told TODAYS.PRG to read on line 2 of the TODAYS.INF file.
The HOL (holiday) file is a good place to put it. Since the
additional files are read on every run, the program will be able to
find it every time it's run.
Users of the Alternate file (Line 3 of the TODAYS.INF file) can
put it in there with the rest of their data since that file is read
every time the program is run.
MONTHLY EVENTS
Suppose that on every day in February, you want to be told
that February is "African-American History Month". Assuming that
you've set up type ! code to be Monthly events in your TODAYS.INF
and TODAYS.RPT files, you could then put the following line into
your TODAY.FEB file:
!02 African-American History Month
Then on every day in February
"African-American History Month"
would be displayed as part of the 'Monthly Events' listing.
The beauty of doing it this way is that you only need one line to do
something like this instead of one line for each day of the month.
WEEKLY EVENTS
Weekly events work somewhat like Monthly and Yearly events, but
with these, they will only come out on certain days of the week.
For instance, suppose you have this line in your TODAY.HOL file:
@ 6Thank God It's FRIDAY!!!!
Every friday then you would get
"Thank God It's FRIDAY!!!!"
displayed as part of the Weekly events listing.
COMBINING YEARLY, MONTHLY AND WEEKLY EVENTS
As I mentioned before, through careful use of the Month, Day,
and Year fields, along with column 10 as a day of the week field,
you can create lines that will only show up on specific days of the
month, months of the year, specific days of the week and so on and
so forth.
Suppose for instance, you've agreed to water someone's plants
for the month they're away on vacation. You could then put a line
in your data files to remind you to go do so like this:
@06 5Go water Sue's plants!
Then every Thursday in June,
"Go water Sue's plants!"
would be displayed.
If you want the line to show up ONLY during 1992, adding in
the year to columns 5-9 like this:
@06 19925Go water Sue's plants!
Then every Thursday in June 1992
"Go water Sue's plants!"
would be displayed.
You can also use the day field in columns 4 and 5 to cause a
line to show up or not.
Suppose your car payment is due on the 15th of each month. In
that case you could use the line:
! 15 Car payment due
to cause
"Car payment due"
to be displayed on the 15th of each month.
Although it may feel like it, you really don't pay for your car
forever, so by adding in a year value you can cause it to show up
only during a specific year:
! 151992 Car payment due
Now "Car payment due" will only show up on the 15th of the month
during 1992.
By making several lines that are the same except for the year
you could cause it to appear over the life of the loan:
! 151992 Car Payment due
! 151993 Car Payment due
! 151994 Car Payment due
If the above lines are in your data file(s), "Car Payment due" will
be displayed along with the other monthly events on the 15th of
every month from 1992 to 1994.
Reports
Starting with version 1.20 users can now "design" the output
report through the use of a "TODAYS.RPT" file. TODAYS.PRG will look
in three locations for this file, and use the first one it finds.
It will first look in the path set on line 1 of the TODAYS.INF file,
then in the default directory where TODAYS.PRG and TODAYS.INF are,
and then where the Alternate data file is (if you're using one)
that's on line 3 of the TODAYS.INF file.
The use of a TODAYS.RPT file is not required, the program has
it's own built in "default" report. This report will also come out
whenever TODAYS.PRG finds something in the TODAYS.RPT file it
doesn't understand in which case you'll also get a error report of
it in your TODAYS.ERR report.
TODAYS.RPT may contain any characters including VT-52, VT-100,
TX2, or IGS codes so feel free to knock yourself out with that stuff
if you're into it. (Personally I don't care much for it, but then
I'm not running your system, am I??)
The TODAYS.RPT file format uses a group of four and five
character "codes" to tell the program where you want to have
information printed out at. It's fairly simple, but VERY confusing
so please read carefully!
Wherever you have %F1% in your TODAYS.RPT file, the program
will replace it with the day of the week (i.e. Monday, Tuesday,
Wednesday, ect.)
Wherever you have %F2% in your TODAYS.RPT file, the program
will replace with the name of the month.
Wherever you have %F3% in your TODAYS.RPT file, the program
will replace with the day of the month.
Wherever you have %F4% in your TODAYS.RPT file, the program
will replace with the year.
Wherever you have %F5% in your TODAYS.RPT file, the program
will replace with the day of the year, as counted from the first day
of the current year. (Also known as the 'Julian Period'.)
Wherever you have %F6% in your TODAYS.RPT file, the program
will replace with the days left in the current year.
Wherever you have %F7% in your TODAYS.RPT file, the program
will replace with the Julian Date, as counted from 1/1/4713 B.C.
(NOTE: for many years to come, this will be a 7-digit number.)
Wherever you have %F8% in your TODAYS.RPT file, the program
will replace with the days left in the month.
Wherever you have %FS% in your TODAYS.RPT file, the program
will replace with the current season.
Wherever you have %HA% in your TODAYS.RPT file, the program
will replace with the header line for type A events (the line that
begins with A in your TODAYS.INF file) and the type A events it's
found from the TODAY.mmm files.
Wherever you have %HB% in your TODAYS.RPT file, the program
will replace with the header line for type B events (the line that
begins with B in your TODAYS.INF file) and the type B events it's
found from the TODAY.mmm files.
Wherever you have %HC% in your TODAYS.RPT file, the program
will replace with the header line for type C events (the line that
begins with C in your TODAYS.INF file) and the type C events it's
found from the TODAY.mmm files.
And so on and so forth for all the lines in your TODAYS.RPT
file.
You've noticed, no doubt, that the word "Monday" is longer then
"%F1%", as are most of the other words. The %'s act as Start/Stop
marks for the program, and the words are inserted BETWEEN them, and
the %'s are deleted.
If the TODAYS program 'collects' a line that begins with a
character not in your TODAYS.RPT file, the line won't be printed out
or displayed. It's simply ignored. So be certain to include a line
for each type of data that is in your data files with a matching
%H command in your TODAYS.RPT file. (unless you don't want it
displayed, of course!)
If you don't want the Type B events the program finds to be
"printed" out, simply don't use the %HB% code in your file, or if
you don't want any type E events to be printed out then don't use
the %HE% code.
I've also built in a number of additional options for each of
the %F options because I believe that YOU should be able to make
things as much as possible to YOUR liking not mine. The file
TODAYS.RPX which was included in the distribution archive is a
'chart' that explains all the various options you can use in your
TODAYS.RPT file. You may want to rename the file to TODAYS.RPT and
run the TODAYS program once to see what all the various options come
out like. Notice what happens to the file in terms of word
wrapping. (The TODAYS.RPT file is NEVER word wrapped!)
You can use and re-use the commands as much as you want in your
TODAYS.RPT file, or not use them at all as you wish!
If one of the %F commands you use in your TODAYS.RPT file isn't
a valid command, one of two things will happen. Either the code
won't be converted, or an error will be generated and the program
will use it's built in report format. The error will be reported in
the TODAYS.ERR file.
A WORD ABOUT THE TODAYS.RPT, THE DEFAULT REPORT AND HEADER LINES
If you've reached this point in the documentation you're
probably some what confused on what all is going on with these
reports. The program has a built in report, but you can use your
own, and why are all the header lines for the various types in the
TODAYS.HDR file rather then in the TODAYS.RPT file?!? And if we
don't have to have those header lines, why are they there?!?
A bit of history about the program may answer those questions
for you. The original TODAY/ST program, and even the current
TODAY/PC program allows users to have only 3 types of data:
Birthdays, Special events, and Reminders. The programs separated
the types for you, provided their own headers, and that was that.
Very little user customization is allowed.
Even in the most current version of TODAY/PC (version 3.4 as of
this writing) about all the user can select is the colors of the
various parts of the display. None of the %F options are available,
nor are any of the %H options. You get what the programmer likes,
and that's it. Period.
Personally, that's too restrictive for my tastes (and hopefully
yours!), so I added in the TODAYS.RPT file. In there, users can
customize to their heart's delight. The 'headers' were still in
the TODAYS.RPT file at this point, and not in the TODAYS.HDR file.
But there was a problem. Suppose you didn't find a birthday in your
run. Well, out would pop the header for birthdays, but since there
weren't any birthdays to display all you got was a blank line.
Likewise, in the built in report, there was a problem. How
could I 'move' the header lines from the TODAYS.RPT file to the
built in report? Especially if the user choose not to use a
TODAYS.RPT file at all!
After fiddling around a while, I decided to put the header
lines into the TODAYS.HDR file. This allowed them to be in two
places at the same time (both the TODAYS.RPT file and the built in
report) and still allowed them to be user configurable. Plus, by
first looking to see what data the program had collected, the
program could figure out which to use and which not to use! (For a
while the header lines were in TODAYS.INF, but this confused some
users.)
Although putting the header lines in the TODAYS.HDR file solved
one problem, it's created another. (It always seems to work that
way.) Suppose you declare a type in your TODAYS.RPT file, but don't
make a header line for it in your TODAYS.INF file? Well, the answer
is is that it'll still be printed out, there just won't be a header
line for it. Also, if you've got your TODAYS.RPT file set up like
I've set it up in the one that was distributed with the program,
it'll appear to 'merge' in with the data from the previous type.
That will also happen if you're using the built in report.
LEGAL STUFF
This program was written in GFA Basic version 3.something or
another. (3.5E I think, but do you really care? It could of been
3.0something. I don't keep too close of a track of that.) This
work is my own, I didn't 'borrow' any routines from anyone else.
(Whopee.)
The program name, TODAYS.PRG, the documentation and the program
itself is copyright 1992 to me, Chuck Grimsby, however feel free to
distribute it as far as you feel you want to. You do not have to
send me any money to use this program. I donate it's USE to the
general Atari ST/TT user base freely. (Heck, I'm going to program
regardless what bucks you send! Programming is my hobby. It's what
I call 'fun'.)
If you feel a real need to send money, send it to some charity
you feel deserves it. (Feel free to include your own retirement, or
kid's college fund.)
Those of you who are married, send a flower or some cheap gift
to your spouse. (That includes you women out there!)
Those of you who are single, send one to your mom, dad, sister,
brother, girlfriend, co-worker, or present one to some stranger you
pass on the street. (It's fun. The looks on their faces...)
Formerly married? Send one to your ex-spouse. That'll confuse
the heck out of them! <grin> (Probably'll blow their lawyer's mind
too!)
What else should I say here? Oh, I suppose something like:
"You use this program at your own risk. I cannot be held
responsible for any monetary loss incurred by it's use or
mis-use, fitness for use, or inability to use."
Or something like that. Basically, if you choose to use the
program, don't blame me if things go wrong. All I can say for sure
is that it works on my system, with my data files, and my system
configuration. (A Atari 520 STm running TOS 1.0 and a 1/2 meg of
memory.) (I used to have a full meg, but something went wrong
somewhere and I haven't had the time to fix it yet. OK, so I'm also
lazy.)
Well, that's it. I'm tired, it's late, and I've promised
people that I'd release this in the morning, so I'm done. Good
luck, and have fun.
Opps! Almost forgot!
Problems? Questions? Requests for changes?
All of the above can be sent to me at the electronic address
below:
Chuck Grimsby
The FlightLine BBS (612-544-5118 1200/2400/9600 (dual) 24 hours)
FIDO-Net: 1:282/47.0 (That's the FlightLine as well!)
GEnie: C.GRIMSBY
UseNet: chuck.grimsby@tdkt.kksys.com
I also read the Atari_ST echo on FIDO-Net and the Usenet's
comp.sys.atari.st newsgroup, so you can send me a message through
there as well.
OK, _now_ I'm done! (Probably cooked my own goose somewhere
too! Oh, well.)