Tinderbox to Scrivener export

User avatar
AmberV
Posts: 20584
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Sun Apr 04, 2010 9:43 pm Post

Well, I'm not sure exactly what you are trying to do, but the first thing that should be made clear is that the sample tbx file I created was meant to be a proof of concept, or at the most a starting point for someone to work from. I never meant it to be a complete book authoring package; it merely demonstrates a single prototype with a couple of templates. The sparsity of the design should mean you can fit it into a more complete tbx system.

These principles might help you out: remember that prototypes can have prototypes. The generic book component prototype that builds out MMD syntax can become the prototype parent of a dozen more practical prototypes, like "POV: Sarah", or whatever you are using them for. So dozens of prototypes can be chained together into a hierarchy where the bottom level only changes attribute defaults to differentiate themselves from the others. As long as you don't trample the stuff that lets the original, top level prototype generate MMD syntax, you're okay.

That said, I put the header definition stuff into the Rule. That is just for simplicity. That's probably not a good place to put it. For one it's a bunch of code execution going on all of the time for something that is essentially static (unless you turn scenes into chapters a lot or something). This would probably better be accomplished as a Macro which is called from the template upon export or right in the template code itself.

Here is an example file using the macro method. I just moved the code from the Rule to a Macro and changed the template to call the Macro instead of using the user attribute. Easy as pie, and should make the top-level component even better for top-level prototype use.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

jb
jb
Posts: 58
Joined: Mon Apr 30, 2007 12:04 pm

Mon Apr 05, 2010 1:40 am Post

Thank you for this. The macro, combined with the 'reminder' about hierarchies of prototypes, gets me just where I want to go.

And I'll study the macro to learn how to write one myself.

Thanks again.

Di
DiamondDog
Posts: 33
Joined: Sat Apr 09, 2011 6:14 pm
Platform: Mac
Location: Exeter, UK

Mon Jun 20, 2011 10:26 am Post

AmberV, I'm late to the party on this one, I know, but I just wanted to say Thank You for all your work on this.

Your HTML 'proof of concept' seems to do exactly what I want.

I'm still noobing it up as far as Tinderbox is concerned, but the knowledge that I'm going to be able to get my musings out of TB into Scrivener quickly, easily, and in a very convenient structure, is helping me a lot right now.

Thanks again.

User avatar
AmberV
Posts: 20584
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Mon Jun 20, 2011 6:44 pm Post

You're welcome! Glad to hear it was a helpful demo for you.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles