Welcome, Guest. Please Login
Tinderbox
  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).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Exporting Outlines (Read 2141 times)
Michael Webster
Full Member
*
Offline



Posts: 8

Exporting Outlines
Jan 29th, 2016, 10:52am
 
Hello. Again, I'm sorry if I'm missing something obvious, but I cannot figure out how to export an outline of the items in a container. When I am in the container and choose "Export Outline," it exports the entire project.

I'm willing to create a template that would do that, but I've read through exporting in The Tinderbox Way, but none of it seems to match up with the app. For example, when I choose Preferences from the TinderboxSix menu, all it shows is registration. Under Edit -> Document Settings, there is no choice for HTML Export Template.

So basically, how do I export only the outline of what is in a container and how do I create and use a template to export text (or HTML or any kind of output template).

Thanks

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Outlines
Reply #1 - Jan 29th, 2016, 12:23pm
 
A number of points. Firstly, The Tinderbox Way refers to the UI of Tinderbox up to v5.x. From Version 6, the Tinderbox underlying framework changed - a necessary part of a long-lived app staying alive as everything else changes. As a result some of the UI changed. Not massively, but some existing things have moved. v6 saw a thinning out of the by-then bloated app preferences. Now, all the app/doc preferences that survive as now in Docuement Settings (Cmd+* or Edit menu).

HTML templates in v6. First, be aware that v6 only uses internal templates, i.e. notes that have been defined with template. To export, you therefore need to add/create at least one template. Once you do so, TB assumes this to be the default template for all notes (though you can still set different ones per note if desired). The easiest ay to start experimenting is to add the built-in 'HTML' template via the File menu then select 'HTML Template' from the sub-menu.

The File -> Export options operate on the whole file (document) so, what you experienced is correct - even if not what you expected. Assuming you've set an export template (e.g. as above), select the container note whose part of the outline you want to export. Then use File menu, Export Selected Note and use the dialog that opens to save your outline.

If you're trying to do something different, just ask.  Smiley
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Michael Webster
Full Member
*
Offline



Posts: 8

Re: Exporting Outlines
Reply #2 - Jan 29th, 2016, 12:56pm
 
Thanks, I see that works with HTML and I will look into that feature someday and figure out how to apply CSS, but for now, I need to export the items in a container as an outline, and I don't see that choice. I can export the whole thing and cut and paste what I need, but that is not a good solution.

Is there an outline template I can get? Or how do I create a text template that will automatically indent the children? I find instruction on what to put in a template file, but not how to create the file? Do I just create a text document in ~/Library/Application Support/Tinderbox/Templates?
Back to top
 
 
  IP Logged
Michael Webster
Full Member
*
Offline



Posts: 8

Re: Exporting Outlines
Reply #3 - Jan 29th, 2016, 1:29pm
 
Okay, I found out how to make a template. Friendly suggestion: It would be nice if that information were in the "Export Templates" section of the help instead of/or in addition to the Exporting HTML part of Help.

I'd still like to know, however, if there's some way to just easily export the outline of a particular container?

Thanks again. I always appreciate your help.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Outlines
Reply #4 - Jan 29th, 2016, 1:44pm
 
I see, but what does 'outline' imply to you? I sense it's not what you're getting with the default template. There's no right or wrong here, but it would help to know exactly what you're expecting to see in the HTML output. Or do you want some other format? Or just titles? Titles & text? Container note data incldued, or only children? Something else? There are so many ways this can go and TB - with the right template - code can normally cope.  So we need to figure out what code we need.  Smiley
Back to top
 
« Last Edit: Jan 29th, 2016, 1:45pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Michael Webster
Full Member
*
Offline



Posts: 8

Re: Exporting Outlines
Reply #5 - Jan 29th, 2016, 1:56pm
 
Thanks Mark. What I mean by "Outline" is what I get when I choose "Export as Outline," only for just the items in one container than for every container in the project: A text file with all the parents and children properly indented according to the outline hierarchy.

<parent>
    <child>
         <child of child>
<parent>
    <child>

<etc>


Regarding the HTML, when I got your last note, I was about to dive back into The Tinderbox Way to try to find the answer, but if that won't be helpful, my problem is that I need to get the title and then all the children (and children's children) of all the notes in a container.

I tried this in the template:

<h2>^title^<h2>
<ul>
<li>^children^</li>
</ul>

and got back:

<h2>Menus<h2>
<ul>
<li>Home
NewsEvents
Events
</li>
</ul>

Each of those items should be in a separate <li> and each has children as well.

How do I code it so it loops through and gets all the parents and children in the container?

Thanks again.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Outlines
Reply #6 - Jan 29th, 2016, 3:07pm
 
Export -> Outline ex[orts the whole file/oultine. You want a single plain text file of the current container and all descendants indented 1 tab per level. As you don't mention note text, I'll assume we're only exporting the note title.

OK, if you haven't already, add a built-in template as that will add a /Templates container, etc. that will help you with set. To the /Template container add a new child note called 'plaintext-outline'. Delete any automatically added text and replace it with the code:

Quote:
^indent("\t",$OutlineDepth-1)^^value($Text)^
^children("plaintext-outline")^


Correction:
Code:
^indent("\t",$OutlineDepth-1)^^value($Name)^
^children("plaintext-outline")^ 



Now select your container, open the HTML Inspector and from the 'Template' pop-up list slect your new template. Now in main view, with your container still selected, pick File menu, export selected note.

Edit: corrected wrong source attribute for title ($Name) data.
Back to top
 
« Last Edit: Feb 9th, 2016, 10:53am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Michael Webster
Full Member
*
Offline



Posts: 8

Re: Exporting Outlines
Reply #7 - Feb 6th, 2016, 1:56pm
 
Hello again. I have followed those instructions to the letter, checked and double checked.

The output file I get contains something, as there are 500 or so kb in the file and there is a scroll bar, but whatever is in there, it is invisible. I have tried simple text, bbedit, and a Mellel, but none of them show anything.

When I export it as HTML, I can see the text (though it doesn't tag the children properly).

Your help is greatly appreciated. Thanks again,  mw
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Exporting Outlines
Reply #8 - Feb 6th, 2016, 5:42pm
 
Please send your document to tech support -- info@eastgate.com -- with details about precisely what you're doing.
Back to top
 
 
WWW   IP Logged
Michael Webster
Full Member
*
Offline



Posts: 8

Re: Exporting Outlines
Reply #9 - Feb 8th, 2016, 3:00pm
 
The problem was that the resulting text file contained only invisible tab symbols. That's because the code you gave me was for the note's text and I didn't have any text in the notes. What I wanted, was the note's title.

This works, mostly.

^indent("\t",$OutlineDepth-1)^^title^
^children("plaintext-outline")^

Is there a way to add formatting that a word processor would understand. For example, <h1> for first level, <h2> for second level, etc.?

Thanks again.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Outlines
Reply #10 - Feb 8th, 2016, 6:01pm
 
For plain text of the title I'd use ^value($Name)^ rather than ^title^ as the latter may encode things like accepted code in HTML number codes.

Try this (not tested as not a Mac right now):

Code:
^indent("\t",$OutlineDepth-1)^<h^value($OutlineDepth)^>^value($Name)^</h^value($OutlineDepth)^>
^children("plaintext-outline")^ 



If $OutlineDepth is value 1, then you'll get <h1></h1> headings and so on down. If a very deep uoltine you may want to gate the headungs at 6 as IIRC, HTML supports 1-6. You can roll your own CSS forr h7 etc but I don't know if Word will style headings about 6.

Edit: Changed example to 'code' mark-up to avoid line break in code
Back to top
 
« Last Edit: Feb 9th, 2016, 10:44am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Outlines
Reply #11 - Feb 9th, 2016, 11:40am
 
Now I'm back at my Mac, here's a demo TBX showing the above code working.

I've tried various forms of plain-text outline (using BBEdit to take the Tinderbox export out of the equation) with Word 2011's outline view. I'd forgotten how bad the latter is! It doesn't seem to want to make sense of even a simple tab-inset plain text. Given that I created the tests from scratch and not via TB, I think this is lack of functionality in Word.

If you go the HTML route, I think you need to import full HTML document - rather than pasting in a snippet of HTML (as in the export demo above) into the Word outliner.

Perhaps someone who's used Word a lot can chime in here? I try to use Word as little as possible these days so my knowledge of the ap is probably a bit out of date.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print