Tinderbox Forum

Import text files into TB with an outline


I am using plain text for documentation purposes and would like to import text files into TB9.
I know I can separate notes with “#” or custom strings and explode them within TB.

However, I would like to import these notes as an hierarchy so that TB outlines the notes ie
Note1 - Subnote1 - Subnote2 - Sub-Subnote1 etc. including the text and attributes.

As plain text can also be used to create csv I wonder how to tell TB the Subnotes properly, so that it will outline.


Depends on how many notes and sub notes you have.

A simple approach I can imagine is to use different delimiters for each level e.g. something like # for note, “!” for sub note etc… and then apply Explode repetitively to first create the individual notes, then the sub notes and so on.

First, you can import tabbed text files into Tinderbox notes; Tinderbox will create one note for each line, and assign containers appropriately.

[tab] Plan paper on “Games and Kitsch”
[tab] [tab] read Arrendt
[tab] [tab] take another look at Sontag
[tab] Plan workshop abstract
[tab] Tinderbox meetup Saturday

A variant of this is .taskpaper format, which might be useful.

Second, you can import CSV documents in which one column specifies $Container; that will do the job.

We could support recursive import of text files and folders. I’ve not done this, I think, for fear that people would accidentally (or over-optimistically) try to import entire repositories of many thousands of files. Malcolm Davidson’s point is exactly right:

  1. If you only need a handful of folders, importing them individually is dull but sufficient

  2. If you need tens of thousands of folders, each with numerous text documents, this might be outside Tinderbox’s domain.

  3. There’s an interesting gap between these two: if you (are anyone) finds themselves in that gap, do let me know!

Hi Malcolm

thank you very much. However, TB will create a note called “exploded notes” each time and it has to be fixed manually.

thank you. I will try to do it in csv with the $Container.

to your point 3. I would be interested. I do notes for reporting to clients later and most of the work is done using Linux. Therefore, plain text is used and I am looking for an effective way to implement into TB

Yes this is deliberate for several reasons:

  • you generally want to do something to/with those notes
  • you may need to repeat the process several times before you figure it out (many things are easier only after it has worked once)
  • the first time you use an Explode, the document adds an "Exploded Notes (not different letter-case) to the TBX. This prototype is applied to all subsequent ‘exploded notes’ containers generated. for those of us who never make mistakes :rofl: first time you can add the prototype from the file menu and customise it before first use.
  • generally, a combination of the above means that the exploded notes don’t then remain under the source note (which may have (too) much text so part of the explode will be to move the notes elsewhere.

More here.

More here and here on TSV/CSV import. Historically TSV is older in Tinderbox but now tab vs. comma delimitation is moot for import. with that in mind (re article titles) see:

just did the first import and then moaned :slight_smile: However, with the prototype in place, I think I can work something out.

Delimited csv import is great but on a terminal shell using text not really efficient as I would need to go through each line till the end. I think I will use the three columns with the $Container and use some specific words to extract later attributes…


1 Like