Export notes as separate text files


(Andreas Grimm) #1

There is a thread on the former Tinderbox-Forum addressing the question: How to Export notes as separate text files. It dates as far back as 2011/2012. And yet, I guess, it’s still valid … somehow …

However, I can’t get it working.

And since a link kindly provided by @mwra within the thread is not retrievable at the moment, I’d like to ask here for help on how to create the appropriate Template(s)/Prototype(s) for exporting notes as separate text files.

Thanks in advance.


(eastgate) #2

^text(plain)

will do what you want. You probably want the file extension (see the export inspector) to be .txt rather than .html .


(Andreas Grimm) #3

Sorry. I still don’t get it.

Do I have to put

^text(plain)

in a template?

Could kindly elaborate on this a bit more?


(Galen Menzel) #4

Hi Andreas,

The attached TBX file will export all the notes in the “Notes to export” container as plain text files with file names set to each note’s $Name.

Some points:

  1. The “Notes to export” container is not special. The reason that the notes are exported is that they have the $HTMLExportTemplate attribute set.

  2. The value of an exported note’s $HTMLExportTemplate is the path of a template note, whose $Text specifies how the note should be exported. In this case, the template note they are using has $Text set to ^text(plain)^. This means that any note using this as a template should be exported as a file containing the plain-text value of the note’s $Text attribute.

  3. The exported notes also have their $HTMLExportExtension attribute set to “.txt” so that notes are exported as .txt files, and not the .html files (the default).

There are a few moving parts here, but it’s not all that complicated. Just play around with this file a bit and you’ll get it.

plain-text-export.tbx (57.8 KB)


(Andreas Grimm) #5

Thank you @galen. That makes things eventually clear, at least to me.

I played around and found out:

  • one can delete “HTML item” - since it’s not needed
  • Export via: File->Export->as HTML … and there you go.

I wish there were …

  • a simple tick-box for separate note export (see mock up below). For quick and dirty plain-text-export. Would that be possible @eastgate?


(Galen Menzel) #6

Provided you have the template note in place, couldn’t you do this with a stamp? Or perhaps I don’t understand your idea…


(Andreas Grimm) #7

Exactly, @galen:

Provide you have the template note in place …

I often do create a Tinderbox file just to jot down or sketch out a few points or ideas (some may jot down in either Simplenote or nvALT) without even naming and saving the Tinderbox-file …

Then, I don’t want to:

  • create Export-Templates

  • create Export-Stamps

I just want to:

  • click on File –> Export –> as Text and there: be able to decide whether to export notes in either one “big” file or separately in lots of “little” files … since it’s rather counter-intuitive, at least for me, to export Text-files using Export as HTML …

It’s for the purpose of quick and dirty jotting down notes and exporting them separately … Stamps and Template should be reserved for rather well-considered and thorough note export …

But, than again, I guess, its just me …?


(James Fallows) #8

I may be misunderstanding this, but it seems to me that the Tinderbox operations can already be near the level of irreducible minimal-keystrokes for the kind of thing you’re talking about. For instance:

  • Suppose you just want to jot down a simple list of items or ideas. For each, a title and some reference notes.
  • With zero formatting or pre-work, you can start doing that with a new blank file like the one shown below. And then, just go over to the right-hand text pane, and you’ll see a $Name-and-$Text summary of the notes you want to select. Either all of them (first image) or some of them (second).

This is with no templates, no HTML, no export formatting, no nothing. Just type in the info, and have it arrayed in the right-hand pane.

Here is how it would look for a few selected notes:

Then you can use just normal Cmd-C copy from the right hand text pane to use that material any other way you want. I recognize that each person has particular work flows, but exporting each note as its own file, as you’re saying, would seem to involve its own overhead too. (You need to name the files. You need to re-open them. etc.) One approach vs the other is not better; not worse; may be preferable for your particular work style. Just saying that there is a simple system already built in.

[quote=“andreas, post:7, topic:818”] Stamps and Template should be reserved for rather well-considered and thorough note export …
[/quote]
As for Stamps, I think of them in just the opposite way – as a quick-and-easy lightweight means of getting something done. Ie, spend the one minute setting up a stamp the way you want. Thereafter you can use it with a net working time of about three seconds per use–almost as if it were a keyboard macro shortcut. (One keystroke to select the item you’re interested in; one keystroke to bring up the Stamps menu; then a click or shortcut key to apply the Stamp you want.)

My point is: there’s no disputing the tastes we each bring to our work. But on a measurable workflow basis, there are already some barebones minimal-keystroke approaches within the system. FWIW.


(Andreas Grimm) #9

Thank you for this, @JFallows.

However, as the title of this thread may tell, my focus here lies exclusively on Exporting (many) notes as separate txt-files; not on copying and then pasting them manually into externally created txt-files.

And: I don’t want to export all notes into one single txt-file either.

I do want to export all notes into separate txt-files - as done in @galen’s kindly provided “plain-text-export.tbx”. However, this involves some steps of creating a Template and setting .html to .txt (with or without a Stamp) and so forth. So I could create a new Tinderbox file, start brainstorming and jotting down ideas and then quickly exporting those notes as separate txt-files to my nvALT-Folder or into Devonthink.

So (since there is already an option in Tinderbox of “Export … as Text”) I was just wondering whether it would be possible to add a(n additional) checkbox in this very “Export … as Text”-Dialog that would additionally offer the possibility of exporting all the notes as separate txt-files beside the default-option of only exporting all the notes into one single txt-file.

For a non-programmer like me it’s rather counter-intuitive having to create a plainText-Template, using an HTML-Export-Routine, renaming .html to .txt in order to simply export notes as txt-files; especially once there is an “Export … as Text”-Option already build into Tinderbox.

But again: Galen’s suggestion works well.

Thank you all for being so pc (= passionately cooperative)!


(Desalegn) #10

This request would be more interesting for the RTF(doc) format.


(Andreas Grimm) #11

This request would be more interesting for the RTF(doc) format.

Let’s say: for both txt and RTF.


(Paul Walters) #12

I agree – interesting – and interesting for text and RTF.

I’d prefer to see a one-click, no-template, export selection as files option – like @andreas suggest above.

(Opinion: RTF is dying. Plain text can be useful for markdown.)


(Pat Maddox) #13

In the mean time, you can create a “template” Tinderbox document already configured to export notes as text (maybe you make that the default new document, if it’s something you do frequently). Then you can set it up one time, and never think about it again.

note: I’m not suggesting your feature request isn’t worthwhile… just suggesting something that you can do today, without waiting for a future TB update :slight_smile:


(Galen Menzel) #14

Yep, this is a perfect case for a starter template file. Store it in ~/Library/Application Support/Tinderbox/favorites and then you can immediately open a copy of it in File -> Open Favorites.

I have a starter file that contains the common prototypes, templates, and stamps that I end up wanting in most of my documents., as well as my preferred look and feel: different default note color, no shadows, no 3-D bevels, no composites, etc.

In this case, you’d always have a plain-text template and a stamp defined to immediately export whatever notes you wish.


(Jawn Lam) #15

Thanks @andreas.

Is there any way to export a bunch of notes all at once with each note as a separate text file with the following requirements?

  • $Name of the note is the FileName.txt of the new text file
  • Values of particular key attributes of that note become the body of the new text file

Here’s what I currently have for my export template:

Item: ^title^


DueBy: ^value($gtd_DueBy.format(“m/d/y H:mmp”))^


Context: ^value($gtd_Context)^


TimeReq: ^value($gtd_TimeReq)^


Status: ^value($gtd_Status)^


(eastgate) #16

HTML Export will do this. You may want to change the export extension from the default .html to .txt or whatever you prefer.


(Jawn Lam) #17

Thanks Mark. I got it working.