Diary V 2.0

Time Manager - Application for Notepad
(c) WOS

written by:

Wolfgang Schirmer
Manshardtstrasse 13 a
22119 Hamburg
Germany

Phone 49 - 40 - 655 39 56

100022,1371, Cserve


22.09.93


First of all I will say many thanks to Mark D Esposito, because 
without his tips and information this program won't have been 
possible. And also for his patience with me.
Thank you Mark !

Also many thanks to John Hind for his great work creating 
FRAMELIB. I used this library writing the program.
Thank you John !

What's new in V2.0

***** Note *****

I changed the handling of variable/fixed holidays, so your old Diary files 
will be reorganized the first time you use them with Diary 2.0. Also for 
each file I create a file which contains the information for repeated 
entries.
The reorganizing procedure worked well with my files, but PLEASE MAKE A 
BACKUP OF YOUR OLD FILES BEFORE RUNNING DIARY 2.0 THE FIRST TIME.

****************

New features:

Now diary works also as a standalone application, although you can't use 
Notepad files when it isn't started from Notepad.


Diary now has repeated entries with these options:

  1. Monthly by date
  2. Monthly by day (e.g. third monday of every month)
  3. Monthly last day
  4. Weekly
  5. Daily
  6. Workday
  7. Restday
  8. Every (x) days

These are nearly the options that gives you the new Alarm Server from Mark 
Esposito. I only left the options repeated 'yearly' and 'every (x) hours' 
which makes no sence for Diary.

Of course you can assign a repeated alarm to the repeated entries.


Pressing <esc> now toggles between the actual day and the last day used, 
like in Agenda.


Now you can select between the weekline or a daily timeline at the bottom 
of the screen by pressing <psion>w.


The three month calendar and the weekline now takes care of the configured 
first day of the week.


Now you can configure the message length for every single Diary file from 
20 to 235 characters.


For entries that doesn't fit into one line now there is a full screen note 
view with word wrapping.


Now you can enter/delete your own fixed holidays like birthdays, wedding 
days. These information is valid for all files and all years. You don't 
have to enter the information again for every new year.




1 General Information

1-1 What do Diary do ?
        I wrote Diary, because I missed the possibility to link an 
        entry from Agenda to a Notepad file. I often have to prepare 
        meetings or take notes in a meeting and wished to have a 
        possibility like this

		9:00 - 10:00 * meeting room 1
		=>linked to a Notepad file which holds the 		
		information necessary for this meeting.

        I know that Diary don't cover all the possibilities you have 
        with Agenda, but I hope to make it better step by step.
        For this, if you're interested in help me, please send all 
        your suggestions and bugs to me. (Cserve 100022,1371)
        Thank you !

1-2 Install Diary

        The following files are provided:
	
        Diary.txt         This file.
        Diary.wrd         The help file in Word format.
        Diary.opa         The main program.
        Diary2.opo        Routines used by Diary
        Diary3.opo        
        Dplug.plg         The Notepad - PlugIn you need to start Diary and 
                          link it to Notepad.

        Diary.fon         Two fonts used by Diary.
        Digt.fon
        Holidayd.dbf      Generic file for german fixed holidays.
        Holidaye.dbf      Generic holidays file for the other countries       
        Framelib.opo      John Hints great utility.
        Asdriver.opo      Marks application to access the ASERVER Server.

        Installation

        Create a directory \Diary\
        Create a directory \Diary\fon\

        Copy the *.fon files into the \diary\fon\ directory.
        Copy the appropriate holiday file into the \diary\fon\ directory.             
        Copy the Diary.opa into any \app\ directory and install it as 
        an application on the system screen.
        Copy the Diary2.opo and Diary3.opo files into any \opo\ directory.
        Copy the Dplug.plg into any \note\plug\ directory and install it 
        with the PlugIns like any PlugIn for Notepad.
******* If you have already installed Dplug as A PlugIn, you only need
        to copy the Dplug.plg into your \note\plug\ directory.
        Copy the Diary.wrd file into any \wrd\ directory.
        Copy the Framelib.opo and the Asdriver.opo to any \opo\ directory.

        To run Diary start it from Notepad using the DPLUG PlugIn, 
        pressing <Psion> k and then the appropriate key.
        You also can start Diary like any other application from the system 
        screen, but you loose most of the features to comunicate with 
        Notepad

1-3 Starting
	
        The first time you start Diary or Dplug you will be asked for the 
        the drive where you will put the datafiles by default,
        the default duration time and the default before time for
        alarms. Also you can decide if you will set alarms by default
        when entering a new item.
        If Diary found no file you will be asked for the name of a new 
        file to create, otherwise you will be asked for a file to 
        open.
        If you press <esc> at this time you will be asked for a new 
        file to create.
        

1-4 The database

        I use a database of my own design, which contains records with 
        fixed length.
        The database is divedid into two parts. The first part 
        consists of a word, which is a pointer to the next free record 
        ($FFFF if the next record is appended to the end of file), a 
        word, which contains the year and an array of 366 words, one 
        entry for each day of the year. This fields contains a pointer 
        to the first record for each day.
        The second part are the records, which contains the 
        information for every entry. They have a configurable length of 
        20 - 235 bytes each. These records are pointered backward and 
        forward.
        If you delete an entry, the place will be occupied by the next 
        new entry.

1-5 Limitations

        Diary can not handle entries for more than one year.

        If you started Diary from Notepad, Notepad is locked.

1-6 The screen

        The screen consists of three parts:
        First     At the left the actual time and date
                  in the middle the date of the entries 
                  and at the right the day of year and the calendar week 
                  of the entry-date .
        Second    The appointments
        Third     Either
                  Two weeks beginning with the configure start of week day.
                  The day of the appointments is indicated by the bold 
                  number and a black point beside Am or PM indicates, 
                  that there is an appointment.
                  Or
                  A daily timeline which shows the spreading of the 
                  appointments by a beam.

1-7 Terms

        Disclaimer:
        I take no reponsability for any lost dataor hardware failure 
        of any kind, due to the use of this software.

        Diary is provided as shareware although it is free of charge. 



2   Functions

2-1 Moving through the entries

    <up>                  one entry up
    <down>                one entry down
    <page up>             four entries up
    <page down>           four entries down
    <home>                first entry of the day
    <end>                 last entry of the day

2-2 Moving through the year

    <left>                one day later

    <right>               one day earlier

    <ctrl><up>            first day of the year

    <ctrl><down>          last day of the year

    <ctrl><left>          one week later

    <ctrl><right>         one week earlier

    <ctrl><psion><up>     first day of the month

    <ctrl><psion><down>   last day of the month

    <ctrl><psion><left>   one month later

    <ctrl><psion><right>  on month earlier

    <esc>                 toggles between the actual day and the last day 
                          used

2-3 Functions

    <psion> o             opens a Diary file

    <psion> n             creates a new file

    <psion> e             inserts a new entry

    <psion> u             updates an existing entry
                          *** Repeated entries can be modified only in all.

    <psion> d             deletes an entry
                          If there is an link to a Notepad file
                          you will be asked if you want to delete 
                          the file also. 
                          If there is an alarm for this entry it 
                          will !! not !! be canceled.
                          *** Repeated entries can be deleted only in all.

    <del>                 deletes also an entry
                          *** Deleted entries are written to the M:\NPBUF31 
                              file and can be pasted therefore.

    <psion> s             sets an alarm to an entry
                          To set an Alarm you must have started
                          the ASERVER.OPO coming with Notepad.
                          An alarm is indicated by the alarm
                          character.
                          You can't set another alarm to an entry.
                          Alarms can be repeated by the following options:
                
                           1. Monthly by date
                           2. Monthly by day
                           3. Monthly las day
                           4. Weekly
                           5. Daily
                           6. Workday
                           7. Restday
                           8. Every (x) days

    <psion> c             cancels an alarm

    <psion> y             changes an alarm

    <psion> j             jumps to a certain date

    <psion> h             pops up a window where you can select if
                          you want to see variable or fixed holidays.
                          *** Variable holidays are those which change the 
                              date every year like Easter or Whitsun. These 
                              dates are calculated in the program and can't  
                              be modified.
                          *** Fixed holidays are all holidays with the same 
                              date every year like birthdays, weddings days 
                              etc. You can enter your own holidays by 
                              pressing <enter> on the fixed holiday view 
                              screen. 
                              !!!! Don't worry about the year 1900. It 
                                   isn't a bug. I need the day of the year
                                   to fix the problem with leap years.
                              After entering a new date the database will 
                              be sorted.
                              You can walk through the entries using the 
                              following cursor keys.
                              <up>         one entry up
                              <down>       one entry down
                              <page up>    one screen up
                              <page down>  on screen down
                              <home>       first entry
                              <end>        last entry
                              You can delete entries pressing <del>.
                          *** Note: All menu functions are disabled except 
                                    <psion> x.
                          Pressing <esc> leaves the window.

    <psion> k             pops up a three month calendar with the actual 
                          month in the middle.
                          The weeks are preceeded by the calendar week and 
                          the week begins with the configured first day of
                          week.
                          You can move arround the calendar with the same 
                          keystrokes as moving through the entries.
                          Pressing <enter> will jump to the selected day.
                          If you left the actual year, you will be asked 
                          for a filename for the new year.
                          If the file exists it will be opened, otherwise 
                          it will be created.
                          Pressing <tab> leaves the calendar.
                          *** Note: All menu function are disabled except
                             <psion>j, <psion>h and <psion>x.

    <psion> l             deletes a Diary file
                          *** Note This option deletes both the main file 
                              and the repeat file.

    <psion> r             renames a Diary file
                          *** Note Since both the main file and the repeat 
                              file must be renamed, you can't give a new
                              extension to the files.

    <psion> t             exports the entries to a .txt file.
                          You will be asked for a filename and the drive 
                          and if you will export all dates (Option 'Yes') 
                          or only dates with an appointment (Option 'No').  
                          Also you will be asked for the dates to begin and 
                          end.
                          If you have the S3-Link attached you can write 
                          the file directly to a PC.

    <psion> p             copies and pastes entries.
                          The copy option writes the entry into the
                          m:\npbuf31 file and paste reads from this file. 
                          So you can paste an  entry several times.
                          Also deleted entries (<psion>d or <del>) are 
                          written into this file and can be pasted.

    <psion> b             searches an entry.
                          You will be asked for the string to search (it's 
                          not case sensitive) and if you will search bottom 
                          (from actual date till Dec,31) or up (from actual 
                          date till Jan,1)
                          Pressing <ctrl>c searches for the next entry.

    <psion> w             toggles between the weekline and the timeline at 
                          the bottom of the screen.
                          The weekline shows the actual and the next week, 
                          beginning with the configured first day of week.
                          The actual day is indicated by the bold number.
                          A black box beside AM or PM indicates that there 
                          is an appointment.
                          The timeline shows the spreading of the 
                          appointments for the actual day.

    <psion> i             shows some information for the actual file.
                          You can leave the screen pressing either <enter> 
                          or <esc>
                          *** Note: All menu functions are disabled except 
                              <psion>x.

    <psion> z             changes the default settings.

    <psion> a             shows Informations about Diary.

    <psion> x             exits the program and returns to Notepad, if it 
                          was started from there.

    <tab>                 links a Notepad file to the current entry, if 
                          Diary was started from Notepad.
                          If there is no actual link, Diary asks 
                          you for a filename and if you will create 
                          a file in the \note\expand\ directory (.exp)
                          or in the \note\ directory (.pad), which will
                          be shown on the system screen. If the file
                          exists Diary opens the file, otherwise 
                          Diary creates it.
                          If there is yet a link Diary opens this 
                          file.

    <shift><tab>          removes the link to the Notepad file, if Diary 
                          was started from Notepad and asks you if you wish 
                          to delete the Notepad file.

    <psion><tab>          jumps directly to Notepad, if it is running 
                          without opening a specified file

    <ctrl><tab>           jumps to Notepad, if Diary was started from 
                          Notepad and creates and/or opens a file called 
                          TODO#DIA as a ToDo file for notes, which doesn't 
                          have an entry in Diary. This file will be sorted 
                          by the project date and for every new date a 
                          special line like this
                          ->     *** Sep 22, 1993
                          is inserted

    <help>                jumps to the Word-Application and opens the       
                          Diary.wrd file.
                          I decided in favor of this solution, because in 
                          this way you can add any information you
                          needed and I didn't put to the help file
                          (And also you can correct my errors)
                          ***  Press <ctrl><menu> to get the whole screen.    
                          ***  Press the Word Icon to get the headlines. 

    <enter>               is a toggle to view messages that won't
                          fit totally into one line. The notes are shown
                          in a whole screen view mode with word wrapping.

    <psion><enter>        Prints the name of the holiday when the 
                          date shows a slashed O at the right.

    <space>               is a toggle to mark entries as done.
                          If there is an alarm attached to the entry   
                          it will be canceled.  
                          The marked as done items are preceeded by a 
                          mark.  


I hope someone else like this program and find it useful.


Wolfgang
