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 2 
Send Topic Print
OPML (was: Tinderbox for iPad) (Read 20853 times)
Matt Cawood
Full Member
*
Offline



Posts: 109
New England, Australia
Re: OPML (was: Tinderbox for iPad)
Reply #15 - Apr 25th, 2011, 7:10am
 
I can't get this to work after copying the TBX to OPML "template" container to a working outline. At first it wasn't calling the OPML Item template, because I'd put the Template container in a different place in my outline. I figured that out, but now I'm getting an export that produces a folder named for the top-level container, with nothing in it.

The HTML window contains something like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Agroecology</title>
<expansionState></expansionState>
</head>
<body>
<outline text="Bradley: intregrated ag">

<outline text="Robert Bradley"/>


</outline>


<outline text="Fertiliser trees, Africa"/>


<outline text="McCains potatoes, Washington State"/>


<outline text="Joel Salatin"/>


</body>
</opml>
 



A couple of the notes listed have body text that doesn't appear in the HTML output.

Advice?

Sometimes I wish Tinderbox was something kickable, so I could kick it. I know I'd be immediately ashamed of my petulance, but there are times when its conventions drive this non-geek to the outer edge of frustration.

Yes, I know that Tinderbox's complexity gives it its power. I still want to kick it.

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OPML (was: Tinderbox for iPad)
Reply #16 - Apr 25th, 2011, 8:02am
 
sorry you're out of sorts with tinderbox right now. Let's see if we can help. Without your TBX and/or a version of the OPML output you expect to see, it's rather hard to give the exact answer. My best guess is the container meets one or more of:
  • No children
  • Container set not to export children
  • Child notes themselves are set not to export
  • The template reference in the container's export template's ^children^ include is in correct.
Given the mistake you reported with the template path for the container's template, I suspect the last bullet above as the most likely cause of failure for your current export.

~~~~~

I believe that when specifying an internal template you don't have to give the full path (Mark B may correct me on this). My recollection is that in the early days of internal templates you needed to cite a full path but now - as long at the template name is unique - you should be able to use just the template note's name. I suspect confusion creeps in at the HTML view template picker shows the full path for any template. In fairness, the latter's listing of paths is actually useful if you've forgotten where a template is!
Back to top
 
« Last Edit: Apr 25th, 2011, 8:03am by Mark Anderson »  

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



Posts: 109
New England, Australia
Re: OPML (was: Tinderbox for iPad)
Reply #17 - Apr 26th, 2011, 8:37am
 
Thanks for the help, Mark. Testiness gone, but the problem remains.

HTML export settings are all true.

Both OPML Doc and OPML Item templates contain the same ^children^ template reference, thus:

Code:
^children(/Utilities/Templates/OPMLtemplates/OPML-Item)^ 



...which corresponds to the container names I'm using.

I tried just using the template name. Nothing appeared in HTML view other than the name of the top-level container.

It's not so much that the templates (with the path specified) don't pick up the child notes - they list all the relevant the note titles - but that they don't pick up the note text. Or export anything, titles or text.
Back to top
 
 
  IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: OPML (was: Tinderbox for iPad)
Reply #18 - Apr 26th, 2011, 9:37am
 
What's the content of the template?

Over here, I know I would invariably mistype "OPMLTemplates" when I intended "OPMLtemplates", and then spend 45 minutes wondering what's wrong.  Just saying...  Embarrassed
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OPML (was: Tinderbox for iPad)
Reply #19 - Apr 26th, 2011, 11:37am
 
Ah, if you're picking up titles and not text (i.e. $Name data but not $Text data) it's likely because that's what you asked TB to do via the 'OMPL-Item" template. Can you post the code for that template (i.e. not its output)?

In its very original form, OPML knows nothing about 'text'. An outline item has a title (equating to TB's $Name data). It seems custom has since embraced Omnigroup's OPML addition of a non-standard [sic] attribute called '_note' to hold descriptive data ($Text) about that item. Tb will read and map OPML '_note' attribute data to $Text.

FWIW, the non-standard attribute "_status" doesn't map (inbound) to $Checked as it might logically do. That's as at v5.8.1, but it will do soon, in which case on export you set '_status" value to ^value($Checked)^. Oh, and don't forget to turn on checkboxes in oultine view so you get to see/use the checkbox data. Map view user? Write an agent to set a tick/cross $Badge (or colour, or whatever) depending on the value of $Checked, including code so if you change the Map display attribute for 'checked' stated, it in turn writes to $Checked so when your OPML exports the check marks are correct in whatever your next OPML tool is.
Back to top
 
« Last Edit: Apr 26th, 2011, 11:42am by Mark Anderson »  

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



Posts: 109
New England, Australia
Re: OPML (was: Tinderbox for iPad)
Reply #20 - Apr 28th, 2011, 3:04am
 
Sorry about the slow reply - wireless broadband has gone screwy, a penalty of remote living.

Code for OPML-Item:

Code:
^if(ChildCount)^^if(Text)^<outline text="^opmlEncode(^value($Name)^)^" _note="^opmlEncode(^value($Text)^)^">^else^<outline text="^opmlEncode(^value($Name)^)^">^endIf^
^children(/Utilities/Templates/OPMLtemplates/OPML-Item)^
</outline>^else^
<outline text="^opmlEncode(^value($Name)^)^"/>^endIf^  

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OPML (was: Tinderbox for iPad)
Reply #21 - Apr 28th, 2011, 3:48am
 
The answers there in the template.  As it stands, $Text is only exported to the '_note' attribute if there are children. I think you need this instead:

Code:
^if(ChildCount)^<outline text="^opmlEncode(^value($Name)^)^"^if($Text)^ _note="^opmlEncode(^value($Text)^)^"^endIf^>
^children(/Utilities/Templates/OPMLtemplates/OPML-Item)^
</outline>^else^
<outline text="^opmlEncode(^value($Name)^)^"^if($Text)^ _note="^opmlEncode(^value($Text)^)^"^endIf^/>^endIf^
 


Which, laid out in more readable form is this:

^if(ChildCount)^
  <outline text="^opmlEncode(^value($Name)^)^"^if($Text)^ _note="^opmlEncode(^value($Text)^)^"^endIf^>
     ^children(/Utilities/Templates/OPMLtemplates/OPML-Item)^
  </outline>
^else^
  <outline text="^opmlEncode(^value($Name)^)^"^if($Text)^ _note="^opmlEncode(^value($Text)^)^"^endIf^/>
^endIf^


For your template copy the code in the 'code' section above - including the trailing line return as it will give better layout in your OPML.
Back to top
 
 

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