What is tdj?
------------
The letters "tdj" stand for "The Daily Journal". It is a PIM program, and is also the name of the binary
executable. It is written using the Qt toolkit from www.qt-project.org.

This is version 3-0.3.

More information below, if you still want to read on.

What does PIM mean?
-------------------
Personal Information Manager (I think), a program which manages daily notes,
appointments, alarms, to-do lists, contacts, addresses, etc.

What can it do, in its present form?
------------------------------------
If you are in the habit of keeping daily notes, or a diary, or a journal  of
your activities, tdj can keep them organised and accessible.

That's nice, but does it ever do anything useful?
-------------------------------------------------
If it does, it does it when I'm not looking. Besides, if it did, do you think
I would be giving it away free?

While there is no guarantee that it will do anything useful, or anything at all,
there is every probability of the version number increasing in the future as
and when I get the time to add more features (especially if anyone asks).

How do I use it?
----------------
The user interface is basically a nice, very versatile calendar, with an editor capable of handling
rich text.

You can store your thoughts for a particular day by clicking on the appropriate date, and
entering the data into the editor at the right. To retrieve the notes for a particular day,
click on the desired date. The same editor window displays the notes, and you can add
to or modify the text if needed.

There is a row of tabs which give access to the various components of the PIM.

You can bring up your appointment table for the current day and you can add and make
changes to or delete any appointment.

You can maintain multiple to-do lists, a table of anniversaries as well as names and
addresses of your contacts, sorted into any organized set of categories of your choice.

Selecting these tabs will display windows where you can enter, modify, or delete
data.

There is a manual also. Read the file "tdjhelp.html" (or "tdjhelp.pdf" if you don't like browsers)
in the downloaded package for more details.

tdj is a small and handy program, and takes up very little space on the desktop, as well
as your hard disk.

Availability
------------
The Daily Journal 3 is available as source code to compile on your own machine, or as a
package containing binaries to install and use.

Compiling the source
--------------------
Untar and unzip the downloaded package with the command:

tar -zxvf tdj.tar.gz

This will create a subdirectory called “tdj3-dist” and extract all the files there.

If you are using QtCreator, the project file to load into QtCreator will be available in this location.
QtCreator and the development libraries of Qt are available from www.qt-project.org. Get the latest version,
and install it somewhere in your home directory. Open QtCreator, and load the project file tdj3.pro which
is available in the source package. Select the version you want to build (debug version or release version)
and hit Ctrl-B. If there are no problems, this should build the binary.

The program has been compiled and tested on both versions 4.8.2 and 5.3 of Qt, on Debian Linux 7 (Wheezy).
There are a couple of warnings, which can be ignored, I think, since it does compile a running binary.
Ctrl-R executes the binary. The binary may be kept in directories separate from the source subdirectory,
depending on how QtCreator is configured. This location will be available within QtCreator.

If you are not using QtCreator, then the Qt libraries should be pre-installed on your system. These would
normally be Qt4.8 (or higher), on most Linux distributions. Also required is the g++ compiler and
development files, as well as the "make" utility. Inside the subdirectory "tdj3-dist" is a Makefile, and
running the "make" command should build the executable.

When the program is executed, tdj searches for a hidden subdirectory called “.cryptdj3”. If this is absent
(which will be the case when it is executed the first time) it issues a notification that it will be created.
Subsequently all data is stored in this subdirectory.

Exit the program and copy the help and image files in the downloaded package to the hidden data subdirectory.
Either use a file manager or open a terminal and do the following from within the tdj3-dist subdirectory:

cp *.png ~/.tdj3/.
cp tdjhelp.* ~/.tdj3
cp COPYING ~/.tdj3

Remember to put the dot (".") in the right place. This will make the on-line help available when the program is
running.

If you are using QtCreator, the location of the locally compiled binary will be available from within
QtCreator. This will normally be “tdj3-dist”, , but may vary if you have configured QtCreator differently.
From this location copy the binary to a place from where everyone working on the computer can run it.

In a terminal window, first become superuser:

su
<type the root password>

Then change to the subdirectory containing the binary and do:

cp ./tdj /usr/local/bin/tdj

Now return to normal user mode by typing:

exit

Installing the binaries under Linux
-----------------------------------
If you don't want to compile the binaries yourself, separate packages contain the 32-bit and 64-bit precompiled
binaries of the program. However, they require the Qt libraries at run-time. These may not be available on your
installation of Linux, and will have to be installed separately. This can be done using any package manager.
Most probably, as of writing this, Qt version 5 libraries are not included in the standard repositories for most
Linuxes. However, Qt version 4.8 are available for all distributions of Linux, hence the supplied binary has been
built using this version.

You can download and install the run-time libraries yourself. I have, for your convenience, included the required
run-time libraries of Qt version 4.8.2 in the binary package. They should be copied to the subdirectory
/usr/local/lib of your system. In order to do this you need to be superuser. The steps described below will do
all of this.

1. First, open a terminal. Determine the architecture of the kernel running on the computer with the command:

arch

or equvalently:

uname -m

If the result is "i686" then the architecture is 32-bit, and you need to install the package named
“tdj3-bin-i686.tar.gz”.
If the result is "x86_64" the architecture is 64-bit, and you need to install the package named
“tdj3-bin-amd64.tar.gz”.

2. Download, untar and unzip the package with the command:

tar -zxvf tdj3-bin-XXX.tar.gz

In the above “XXX” stands for “i686” or “amd64”. This will create a subdirectory called “tdj3-bin-XXX” and
extract all the files there. This contains the help files, the run time libraries, and the executable.

3. Change to the newly created subdirectory:

cd tdj3-bin-XXX

4. As superuser, copy the Qt run-time libraries to /usr/local/lib (remember the "dots" below):

First become superuser:
su
<type the root password>

cp ./lib* /usr/local/lib/.

5. Then run the "ldconfig" command to register the libraries:

ldconfig -v

6. Copy the The Daily Journal binary to a place from where everyone working on the computer can run it:

cp ./tdj /usr/local/bin/tdj

7. Now return to normal user mode by typing:

exit

8. Run the binary:

tdj

This will create a hidden subdirectory called ".cryptdj3" which is required to store the data created by the program.
Exit the program.

9. Copy the help and image files to the hidden data subdirectory. Remember to put the dot (".") in the right place:

cp *.png ~/.tdj3/.
cp tdjhelp.* ~/.tdj3
cp COPYING ~/.tdj3

This will make the on-line help available when the program is running.

Remember that the precompiled binary requires the Qt run-time libraries. If these are not found there will be
an error message to that effect when executing the binary.

Installing the binaries under MS-Windows
----------------------------------------
The source code can be compiled using QtCreator for Windows, as it is, with no modifications. To do
this you will need the Qt development libraries for Windows as well as the Windows version of the
GNU cryptographic library (libgcrypt).

If you don't want to compile it yourself, a zipped archive named "tdj3-bin-win.7z" containing a 32-bit binary
executable is available for download.

This package needs to be extracted using the utility 7z, which is a freely available program. This will
extract all the files into a subdirectory. Along with the executable the necessary libraries have also
been provided. All of these should be in the same subdirectory.

Running the program once will create the data directory ".cryptdj3" in your user area. The path will typically be
something like "C:\Users\{your-user-name}\.cryptdj3".

Copy the PNG, PDF, and HTML documents, as well as the file named COPYING into this data directory using
the Windows file manager.

Run the program from the location where it has been extracted. The binary has been created using
Qt version 4.8.2 and MinGW version (coincidentally!) 4.8.2.

That's it.

Changes in version 3-0.3
------------------------
1. Added a toolbar and converted the editors from plaintext to rich text. Code for this has been
shamelessly re-used from the Richtext example in the Qt documentation.

A major consequence of the change from plaintext editors to richtext editors is that the data is
stored and interpreted as HTML. This means that earlier notes will be interpreted as HTML. Since
HTML rendering recognizes line breaks and paragraphs in a different manner, all line breaks and
paragraphs in existing notes will be ignored, and you will have see an unbroken stream of text.

The notes, lists and contact data will have to be re-formatted manually.

3. Added the facility to export the notes and lists as plaintext.

4. Removed the facility to convert data created by the FLTK version "fltdj2" to the new version 3 format.
This is available in version 3-0.2, for those who need to convert old data.

Changes in version 3-0.2
------------------------
Added compiler directives to detect whether the binary is running under MS-Windows or Linux, and
to set the data path correctly.

Changes in version 3-0.1
------------------------
Converted the user interface from FLTK to Qt.
This was a complete program rewrite with modifications of the layout in accordance with the new
toolkit.
The notes and appointments data have been split into different files.
Addition of appointments which repeat daily.
The program converts fltdj2 data to the new format once when it is newly installed.
Modification of the user manual.

All earlier versions of The Daily Journal were named "fltdj" and used FLTK, "The Fast, Light Toolkit"
from www.fltk.org.

What is the copying policy?
---------------------------
GPL, of course.
While it is copyright, (C) 2001 onwards, Kartik Patel  the program is also free
software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by  the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.  This program
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You
will receive a copy of the GNU General Public License along with this program;
for more information, write to the Free Software  oundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.

What else?
----------
That covers it, more or less. Email me if there is anything left out, or there are problems in istallation.

Enjoy!

Kartik Patel
letapk@gmail.com
http://kpatel.x10host.com
