JournalRecipe

browse

I have been working on a way to use pmWiki and Wikipublisher to create a powerful and beautiful journal for me to write my life into. After many days of work I think I have found a very nice solution which now I'd like to share with whoever may be interested.

The main features of the journal are:

  • The journal is available on-line for accessibility and on-line reading.
  • The journal can be typeset into a professionally looking document for print using the powerful LaTeX typesetting engine.
  • Journals are year-based with months as chapters. Major events become sections. Minor events take up space between sections and are typeset in a smaller font to highlight that they are just minor events.
  • Each journal entry is written in a data-centric way. How the entries are displayed, both in print and on the web, is described in a template. This allows for very quick changes as only the templates need to change.
  • Using pmWiki's security model, the journal can be password protected.

To get the journal working there are a few modifications that need to be made. In the following pages I will go through the process of setting up your own journal. I will assume that you have pmWiki and Wikipublisher already set up. But first, let's look at the finished product, a little test journal set up for 2008. Especially take a look at the source of the pages using the source link at the bottom of each page. Here are the four different kind of pages we'll be dealing with:

  1. The main journal page, JournalRecipe.2008, is where the wikitrail is automatically created using the available entries of the three kind below.
  2. Every month has an entry page, like this one, JournalRecipe.200801. They have the naming convention of yyyymm.
  3. A simple major entry is one such as JournalRecipe.20080101. They have the naming convention of yyyymmdd.
  4. A major entry which spans several days look like this, JournalRecipe.20080109-20080113. They have the naming convention of yyyymmdd-yyyymmdd.

As you can see from the source, the month, day and multi-day pages all use the WikiForm recipe. As per normal with that recipe, we need to define the FormTemplate and ViewTemplate pages. Take a look at the source for those pages and it should become clear why the entry pages look the way they do.

The WikiForm recipe normally only work with pages with the naming convention of nnnnnn. To get WikiForm to apply the ViewTemplate on our yyyymm, yyyymmdd and yyyymmdd-yyyymmdd pages, we need to add a custom change to a .php file. I recommend adding it to the group wide .php file for your journal. In my case it will be /local/JournalRecipe.php. I will leave it as an exercise to locate which lines of code relates to this particular effect. [^Yeah, I'm too lazy to explain it.^]

The year page uses a Wikipublisher Recipe to typeset a PageList using a custom PageList Template. These changes goes into Site/LocalTemplates.

Finally, there are minor events that happen which you may want to record in your journal, but which don't deserve their own page and header. Things like, "Today I wrote a tutorial on how to make a wiki journal." For these minor entries I have defined the appendix section of the entry pages. The naming convention of these minor entries are "nn: Minor Entry" or "nn-nn: Minor entry spanning several days" where nn is the day of the entry. It will take the year and month from the page it resides in. For a multi-day minor entry spanning across month boundaries, simply use this syntax: "yyyymmdd-yyyymmdd: Entry text". For multi-paragraph entries, end each paragraph with \\, like this (without "):

"nn: First paragraph\\"
"Next paragraph"

This is a very quick walkthrough of the code. I don't expect it will make much sense to non-techies. But it should be enough to get you on your way. I am happy to help if you get stuck. Just mail me.

source

Search Hide sidebar