News:IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).

I would like to be able to move material from Tinderbox to Scrivener, without writing scripts. So I've been reading both forums to see whether it can be done and, if so, how. Here's my understanding at the moment, after trying several illustrations. If this is not accurate, please let me know.

1. Tinderbox outline formats can be moved from TBX to Omnioutliner via copy and paste. Just the headlines; not the contents of the containers.

2. Omnioutliner outlines can be moved to Scrivener, both headlines and contents of "containers." That's done via OPML. Save the file as OPML, then import into Scrivener.

I can see no easy way, short of scripts, to move the contents of TBX containers to Scrivener, save manual copy and paste of the contents of each container.

You could easily use OPML templates, much discussed here, to effect the export. No scripting is needed.

Greetings, Mark. Can you direct me to some information on how to do that. Is there a template already prepared? If so, where is it and how to I use it to export? If not, are there some directions somewhere as to how to prepare a template to export via OPML?

However, I had a go at it and was unsuccessful, so perhaps this is a good opportunity to clarify the exact steps needed. In order to get the resulting OPML files to open in OO, I had to manually add some missing slashes. (I figured this out by creating an identical outline in OO, exporting to OPML, and then comparing the two OPML files.) But anyway, the problems I ran into may have been a result of not properly understanding Mark's instruction regarding "taking care to encode for XML standards and to encode paragraph breaks in $Text."

Thanks for the experimental work and for passing it along. That's precisely, however, what I'm hoping to avoid. And I'm sufficiently eager to avoid it that I might not use TBX for the early, data gathering portions of the project. It's far and away the most powerful tool for such but it remains terribly difficult to get the information to my writing platform, Scrivener, without lots of manual copying and pasting.

I had hoped for something easier. I haven't given up and will take a look at the links you've provided.

However, to step back to my original post, I gather that stands as the basic way to move material from TBX to Scrivener unless one steps into the template creation business.

As I said, if I figure anything else out, I can post here, and I'm sure there are others who know much more.

Also, if you go ahead and try the method Mark A describes (in aTbRef), one the one hand it may simply work, and on the other hand, if you run into trouble, I'm guessing someone here could help with the details.

It's far harder to get the information you need than it is to spend an afternoon copying and pasting -- and that's the worst case scenario, if you absolutely don't want to take the trouble to learn a handful of export codes.

We've got some interesting Scrivener export features coming in the next few months.

But there are innumerable ways you might want to arrange a project in Tinderbox, and almost as many ways to arrange one in Scrivener. The more you do yourself -- either manually or using the power tools of Tinderbox export -- the more flexible you can be about arranging everything just the way you want it.

It's one of the sources for my bit of kluge--TBX to Omnioutliner to Scrivener with some manual copy and paste of TBX contents into Scrivener. And is my plan for the moment.

I gather from this conversation so far that my little kluge is the best there is, short of pulling out the coding tools. I'll take a look but would much rather spend my time working on my content than writing code. At least at this stage of my life.

As for Mark, I understand your point and it's been a point you've made to me several times. Output from TBX is difficult--printing, exporting to other programs, etc., without learning your code. It's one of the things that accounts for my on-again off-again relationship with TBX.

But I'm still here. Because of the power of TBX and because, despite a bit of diffidence at times, you guys supply among the very best customer service in the business. And I appreciate that.

I did a little tweaking to Mark A's OPML code, and I've got it working now. So, here are the basic instructions:

1. In your TBX file, create a top-level note with the title "TEMPLATES"

2. Create two children of "TEMPLATES" with the following names: "OPML-wrapper" and "OPML-item". Make both of these notes into templates by opening the rename window of each and clicking the checkbox "Template".

5. Open the document preferences (command-8), click on the "Text Export" tab, and choose "/TEMPLATES/OPML-wrapper" as the default template.

6. In Outline View, create a single parent note for everything you want to export (so that for what you export there will only be one top-level note).

7. Click on this top-level container note, then click the File menu and select "Export as text".

(7b: In the "Export" window, there are four buttons on the top left. Make sure the one for "Selected notes" is selected.)

8. Click the Export button and save the file, manually adding ".opml" as a file extension.

9. You should now be able to open the resulting OPML file in OmniOutliner.

Note: I don't have an expert understanding of Tinderbox export codes or of OPML, but so far the above seems to be working here. Starting with Mark's "OPML-item" code, I added a missing slash near the end and also a clause for notes that don't contain text. It wasn't clear to me that I did this correctly, and I can't make any guarantees, but it seems to work.

You could always just copy everything you want to export and paste it into the sample TBX.

Hope that helps!

Lucas

(Later: If you try to export a very large volume of notes it may take a while. So I suggest trying it first with a smaller group of notes to make sure you get the desired result. If it works, then you could try something larger.)

Lucas' problem had me scratching my head but I've found the error in the source reference. OPML 'outline' tags follow XML convention and are (sould be!) written in one of two ways: <outline></outline> <outline />

The first form is used to nest descendants' oultine tags. Items with no children use the second form. In the aTbRef code reference cited further above, the closing '/' in the second form of tag had somehow gone missing. It definitely was correct when originally tested and posted so I guess got broken in subsequent editing (liely when the support for checkbox data was added). Anyway, the original aTbRef is now corrected - i.e. meeting Lucas' correction. Whilst the hood was up I also updated the ^if()^ syntax to current standards whereby all short-form attribute queries use the $-prefix. Thus ^if(Text)^ becomes ^if($Text)^. Both forms currently work but eventually the non prefixed version won't when legacy code support is dropped.

For John, the result of the last paragraph's change is here, "OPML-Item":

Hi, Mark: You may want to check--your file doesn't seem to quite work. It leaves "parent" items nameless. Lucas' works, though, at least for what I've thrown at it. Thanks!

This sort of thing is why I've never invested the time to go beyond very basic export. It's not that export is hard--it's that it's fussy. That's why it's great when people donate their time and share their work product!

Hmm. That's odd. @Lucas' code doesn't make sense, insofar as it adds a cluase that says "if there is no $Text set the value of OPML attribute '_note' to value of $Text. So I don't think that the issue. it may be a whitespace thing.

Six cheers for Lucas, whether his code makes sense or not. It definitely worked. Though it took me a bit to fill in the blanks.

I needed this kind of very explicit, kindergarten level hand holding to make it work: click on this button, paste this code, check this box, etc. However, I forgot that any templates note had to be checked as such. Spent some time trying to correct my errors at that stage. But the proverbial light finally went off in my head.

Once Mark Anderson gets his code cleared up, I'll try it as well. But, at least for the moment, Lucas' work "works" perfectly.

I gather the coding is elegant but the process definitely is not. It would be much better to have this built in to the process. At least for non coders. Coders could always modify the code to fit their circumstances.

Why not have this opml code or some other as one of the built in text options?

Thanks again, everyone, particularly Lucas. I would say your code made it possible but, actually, more than the code, it was the kindergarten instruction set.