Sunday, February 1, 2015

Text Rules for Journals and Notes?

I have written about my admiration for Todo.txt before. Todo.txt format rules may, it appears to me, be extremely interesting as a model for other contexts as well. What are they? Let's summarize: (1) they are plain text files. (2) There are “a few simple but flexible format rules” to “take advantage of structured task metadata like priority, projects, context, creation and completion date.” Its two goals, namely that they (a) are human-readable without any other tools than an editor, and (b) can be manipulated in a text editor. This could be a model for other applications.

There will be differences: Todo items take up one line. Todo.txt uses the following conventions for these lines. An "(A)", "(B)", etc. indicates priority, "@phone", "@home", etc. context, and "+teaching", "+book", etc. projects. The unmarked text in the line actually is the description of the task. The rules are:
  • If priority exists, it ALWAYS appears first
  • The creation day may optionally appear immediately after priority and a space
  • Contexts and projects may appear anywhere after priority and prepended date

There are also rules for completed tasks (mainly that they start with an x) and for add-on rules (mainly that they should follow the format “key:value” without whitespace characters.

How might this be useful for journal or note entries, for instance? Wile they obviously do not consist of one line items, it would be possible to write similar rules that define a journal or note item.

Let’s look at what might be called Journal.txt: It consists of two or more paragraphs. The first paragraph is always a header or identifier consists of one line with a date, YYYY-MM-DD, followed by an optional title, like “observations” or whatever. The following paragraphs, containing the text, would have no identifying characters, while the final paragraph would again consist of just one line starting with :: (or something similar) to indicate key words and other meta-information. Every entry would need at least one expression starting with “::”. (Other optional file format definitions may be on this line as well.)

Note.txt would be structured similarly, but it would probably best not to start it with a date, but with some other character, like “#”, perhaps.

Why do I think this might be a good approach for journal entries and notes as well? Just take a look at this Todotxt page. There is a plethora of applications for different platforms that take advantage of the todotxt format and who can take advantage of the same file. I would welcome this for journal and not entries as well, but I am probably just dreaming.

There is another advantage (that does not matter to me). It could be used at the command line!

1 comment:

Joe Smith said...

You hit the nail on the head. I have been looking for such an application! Does this exist? I use todotext.net (which follows the todo.txt format) for managing tasks in Windows, and I'd love to find a similar application for journalling and notetaking.