Exporting my Tinderbox Daybook to Org Mode

Every month I export my Tinderbox “Daybook” entries so that I can print and bind them (a whole other story). I have a pretty good Org Mode setup for creating PDFs so I wanted the output to be Org Mode files.

Previously, I used the built-in OPML templates and then converted the output to Org Mode using Pandoc. This was all a bit cumbersome, so I created simple Org Mode export templates, based on the default OPML templates.

Template: Org Mode

1
2
3
4
5
6
7
8
9
#+TITLE: Daybook ^value(attributeEncode($Name))^ 2016
#+DATE: 
#+SETUPFILE: ~/Dropbox/org/_SETUP_DAYBOOK
#+OPTIONS: toc:nil num:nil >:nil ^:nil <:nil H:2
#+STARTUP: overview

^action($HTMLExportExtension=".org")^

^children(/Templates/Org Mode/Org Mode Item item)^

The front matter sets up my preferred options and LaTeX settings.

Template: Org Mode Item

1
2
3
4
5
6
7
8
^if(ChildCount)^*^indent("*",^value($OutlineDepth(parent)-1))^ ^value($Name)^ - ^value(format($StartDate,"M0-D w"))^

^value($Text)
^children(/Templates/Org Mode/Org Mode item)^*^indent("*",^value($OutlineDepth(parent)-1))^
^else^*^indent("*",^value($OutlineDepth(parent)-1))^ ^value($Name)^  - ^value(format($StartDate,"M0-D w"))^

^value($Text)^
^endIf^

This just loops over the notes and outputs org-formatted text.

So, to process my monthly Tinderbox Daybook I do this…

  1. Select the month in Tinderbox
  2. Choose “Export Selected Note”
  3. Open the exported file in Emacs
  4. Hit “CTRL-x CTRL-e l o” to export a PDF
  5. Print.

It looks like this:

/img/2016/daybook-export.jpg

Much better!