The method I described before still works just fine, but in the interest of documentation, I will explain again with a bit more detail, as the original post was assuming some background knowledge.
This method will describe a system which has a rich text emphasis. Unless you use very short note names in Tinderbox, you’ll want to stick with the described usage of generating generic, sequential titles. Note names will
be retained, but will be placed into the text area as rich text titles. Consequently the Binder, while matching the structure
of the Tinderbox outline, will have different names. If you want a method which focusses on retaining outline names, stick around, I’ll have another method up shortly in a different message posted to this thread.
The first things to be done are to set up the Tinderbox file in a manner which will produce results that Scrivener can best use. The things we want are:
- The outline structure in Tb becomes the Draft structure in Scrivener
- The headlines in Tb become titles in Scrivener
- Note text content becomes body text in Scrivener
- Optionally, rich text styling is translated as well
Given the above wishes, the best method for exporting out of Tinderbox is going to be a combination the HTML exporter, a simple template, and a few system attributes set up the right way.
I’ve uploaded a sample Tinderbox
file which you can download and examine.Setting Up Tinderbox
There is only one caveat to watch out for here, and that is once Tinderbox exports the files into the Finder, alphabetic order becomes a concern. We can make sure this is avoided with a simple rule and a prototype or two. In my example, I have created two prototypes and a template, here are the recipes:Chapter
- $Rule: `$HTMLExportFileName = "Chapter " + $SiblingOrder`
- $HTMLExportTemplate: `/Chapter Template`
- $OnAdd: `$Prototype = "Scene";`
- $Rule: `$HTMLExportFileName = "Scene " + $SiblingOrder`
- $HTMLExportTemplate: `/Scene Template`
Code: Select all
This will place the chapter title at the top of the first scene of every chapter.Chapter Template$Text
You may or may not end up with more complexity, but these four elements will create a working, flexible scenario.
You might have something that looks like this:Example Tinderbox Layout
In this example, I’ve set Library to not export, and not export its children either. This way you don’t get stray files in the export. The trick with the chapter template is that chapters are empty. Since they are empty, the `^text
` call receives no data and thus produces no “Chapter 1.html” file beside the folder name. If your chapter container do
have text, then you’ll need to revise my strategy to accommodate for that, and you’ll have to do a little more work on the Scrivener end
. Both Scrivener and Tinderbox can handle the concept of containers with text in them, but the Finder cannot, so container text must be placed beside the container in a separate file.Exporting from Tinderbox
Now use `File/Export as HTML...
` menu command and choose an export location. Once that is complete, navigate to that location in the Finder.
You should get something that looks like this:Finder export resultsImporting into Scrivener
Now open up Scrivener and make sure you have it set up to import HTML files as text. This will convert Tinderbox’s HTML styling into RTF files when you drag them in. Once that is set, drag the chapter folders into your project Binder. You won’t be able to drag them directly into Draft because it needs to process them first. Once they are imported, you can drag them up into the Draft.
Here is what I get:Final result
Note the chapter names and scene names have been converted to rich text titles, as well as bold and italics. From here you should be able to tweak the templates and so forth to produce results to your liking.
One errata from the originally linked post. Setting `$HTMLFileNameMaxLength
` to 128 is not a good idea. Tinderbox still doesn’t handle this correctly and will silently fail if file names go beyond 32 characters (including the “.html” extension). It is for this reason that I have opted for short, numerically sequenced titles. If your internal outline titles are all very short, you could probably get away with using the name of each note. Just change the above to `$Rule = $Name
` to get a legible result. Be aware that if any
titles are longer than 32, they just won’t export at all. You could silently lose data this way.Footnotes
The easiest way to do this would be: once you have dragged everything into Scrivener, select both the Chapter folder and its associated text file and press Cmd-Opt-M to merge them. Also, make sure the chapter folders are closed in the Finder when you drag. There is a small bug in the current version of Scrivener which imports things twice if you select a broad range of files in the Finder from uncollapsed folders. Easiest way to avoid this is to just drag the “Draft” folder into the Binder by itself. Don’t worry, it won’t conflict with the real Draft item in the Binder, and you can delete it when you are done.