# Diary Help

Diary is a daily journal program. It is modelled after the notion of a physical diary, a book in which you write an entry every day. It makes a few concessions to the fact that this is a computer program — there are two categories of daily entry, "facts" and "thoughts", and the entries are searchable — but the program has no bells and whistles. This is the program that I use to keep my own daily journal. I have been keeping this journal for over 20 years, and it contains over 15 MB of text, so I know that the program scales decently.

The emphasis is on simplicity and safety. The diary file is ordinary text (XML); it can be opened and read with any word processor. Thus there is no ultimate dependency upon any particular program or system. The program itself has minimal code, and this is deliberate; it is in effect simply a front end (almost a walking advertisement) for the basic capabilities of Core Data and Cocoa bindings.

To use Diary, start it up and press the New button. A new entry is created with today's date. In case you sometimes miss a day and end up writing your daily entry the next day, the Day Before button lets you change the date of the entry to the previous day. There is also a date field so you can set the date to anything you like. Nothing prevents you from giving two entries the same date, but you aren't supposed to.

Each entry has two fields, Facts and Thoughts. This is a distinction I created when I started my own journal. You don't have to use it. Since you are expected to be working in Facts most of the time, and since Thoughts entries are expected to be relatively rare, the words "Thoughts exist" appear at the bottom of the window if an entry's Thoughts field has any content.

There is no provision for deleting an entire entry (the idea being that there should be no way to erase the past). However, past entries remain editable.

To search, open the Search popover (use the magnifying glass button at the top left of the window). All three types of built-in search are implemented: "Literal", "Wildcard" and "Regex" correspond to the predicate verbs CONTAINS, LIKE, and MATCHES. The first two are case-insensitive. (Regex searches let you set case-sensitivity for yourself.) The effect of a search is simply to filter the entries so that only matching entries appear. You can perform successive searches related to the currently showing results ("Within" and "Also" correspond, in effect, to AND and OR respectively). To show all entries, cancel the search (press the "X" in the search field). You cannot create an entry while entries are filtered.

The application uses a single document, Diary.xml, which is automatically created in ~/Library/Application Support/Diary if it doesn't exist. If you want to keep the document elsewhere, move it to its real location and then substitute an alias called Diary.xml in the Diary folder.