Exporting a Container

All of my examples so far have imagined that you want to export single notes one-by-one. In reality, this will rarely happen: if that’s what you wanted, you’d be using a word processor.

No, most of the time, you have a pile of notes, all built up individually but which you’d like to become one thing upon export.

Tinderbox anticipates this and allows you to export containers of notes.

Exporting a Container

I’m going to use my MLA citation example again here.

Let’s imagine that I want to construct a bibliography that includes all the books I have in my file. What I imagine for my output is  for the citations for each of my notes to be combined into a list with one following the other. Each of the notes already has the MLA template assigned to it, so I could export each individually and compile elsewhere, but that sounds like work. Instead, I want a single export producing one list that includes all the necessary citations.

To do this, I simply place the notes for my bibliography (or their aliases) in a container and then export that container. The export template that I need to create for that container will look like this:


That’s it. That’s all.

Create a template with this export code, assign it to a container, select the container and export it, and you get all the notes inside it compiled into a single export.


Exporting with a Specific Template

What happens though if I decide that I want to export the children of a note using a template that is not assigned to them? If for example, I want to export the same notes I’ve used to create a bibliography as a .csv file using my .csv template?

This too is easy.

The ^children^ export code allows you to specify a template to use when compiling. You simply include the name of the template you want to be used in parenthesis. To compile a csv export, I would create a new template that looked like this:

The parenthesis tells Tinderbox to ignore the template assigned to the individual notes in a container and to instead export them with the csv template I built. In my case, I chose to give the entire path to the template, but if you aren’t duplicating note names in your file, you should be able to just list the template name.

Assign this template to any container of notes and you’re good to go.

Using Multiple Templates

In the sample file, I have set-up a separate container for each of the export types and populated it with aliases. This allows me to have each template assigned to it’s own container and leaves me with a stable base for doing multiple exports.

If I want to export a bibliography, I populate the container with the relevant notes’ aliases. If I want a collection of book notes, I do the same in that container. The advantage of this set-up is an easy access to multiple ways of exporting the same notes.

For the full list of export examples, go here.