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 20859 times)
Paul Walters
Full Member
*
Offline



Posts: 267

OPML (was: Tinderbox for iPad)
Jan 29th, 2010, 5:21am
 
FWIW, There's an interesting little app for iPhone (I presume also compatible with iPad) called CarbonFin that reads/writes/exports OPML outlines.  Tinderbox can ingest OPML and, with not much effort (a simple export template) export to OPML and back to CarbonFin.  A couple years ago Mark Bernstein in his blog published a link to this review of CarbonFin on Jon Leavitt's blog.

I put a little Tinderbox file here that demonstrates exporting/importing to CarbonFin using OPML:  http://drop.io/TBX2CarbonFin
Back to top
 
« Last Edit: Mar 27th, 2011, 4:47am by Mark Anderson »  
  IP Logged
Alex Strick van Linschoten
Full Member
*
Offline



Posts: 61
Holland
Re: Tinderbox for iPad
Reply #1 - Jan 9th, 2011, 8:04am
 
This file seems to have vanished, since the service no longer functions. Any chance someone could repost this file?  Thanks.
Back to top
 
 
WWW strickvl   IP Logged
Christopher Menice
Full Member
*
Offline



Posts: 10

Re: Tinderbox for iPad
Reply #2 - Jan 9th, 2011, 8:31am
 
I agree! I'd like to see the file as well.  Thanks!
Back to top
 
 
  IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: Tinderbox for iPad
Reply #3 - Jan 9th, 2011, 11:21am
 
I moved the TBX to OPML file over here on Dropbox.   A demo of how to work with Tinderbox and CarbonFin.   In Safari: right click the link and select "Save Linked File As...".  The file will be saved as TBX to OMPL.tbx.xml - just remove the .xml suffix.
Back to top
 
 
  IP Logged
Alex Strick van Linschoten
Full Member
*
Offline



Posts: 61
Holland
Re: Tinderbox for iPad
Reply #4 - Jan 9th, 2011, 11:22am
 
Thanks Paul.
Back to top
 
 
WWW strickvl   IP Logged
Jean Goodwin
Full Member
*
Offline



Posts: 136
North Carolina
Re: Tinderbox for iPad
Reply #5 - Jan 9th, 2011, 12:25pm
 
Like Paul, I've found CarbonFin Outliner for iPhone/iPad works well in a loop with Tinderbox on the desktop.  After months of use, however, I've started to get annoyed at the lack of a full screen interface, plus having to keep track of yet another syncing service is hard on my brain.

Another option is the mindmapping app iThoughts.  It can import/export "Tinderbox compliant" opml via Dropbox--for me, that's a plus.  Its maps aren't too fussy, and its use of touch-screen gestures is nice.  It won't work for long-ish hierarchical writing, but for brainstorming and meeting notes, I've come to like it.

Of course, this is all pending Tinderbox for the iPad! (Hint, hint.)
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox for iPad
Reply #6 - Jan 9th, 2011, 12:37pm
 
Thanks, Paul. Might I propose updated versions of the templates?  The proposals are functionally the same, one-for-one replacements, as the demo's templates but differ in using some newer TB syntax and codes which may avoid some encoding edge cases and other issues:

New OPML-Wrapper:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>^title^</title>
<expansionState></expansionState>
</head>
<body>
^children(/TEMPLATES/OPML-item)^
</body>
</opml> 



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



I notice Carbon Fin's own OPML output uses single quotes for attribute values. Whilst XML allows either single or double quotes, double seems the more normal convention and TB's ^opmlEncode()^ makes it safe to use attribute values with quotes in as these are changed to XML/OPML-safe entities.

If you wanted to share ToDo list ticks, Carbon Fin uses an OPML attribute "status". I'd suggest having a TB user Boolean attribute, like $IsComplete and a string attribute $status (N.B. lowercase initial to match CF export). I'd envisage $IsComplete being a key attribute for notes and $status being not shown in TB. Carbon Fin's exported 'status' value is either 'checked' or nothing. Importing CF OPML to TB will set the status field; use Rules or agents to cross-map the $status and $IsComplete attributes:

TB to imported CF state:    if($status){$IsComplete=true}else{$IsComplete=false}
Export TB state to CF:   if($IsComplete){$status="checked"}else($status=""}

An OPML-Item template including the status:
Code:
^if(ChildCount)^^if(Text)^<outline text="^opmlEncode(^value($Name)^)^" _note="^opmlEncode(^value($Text)^)^" _status="^value($status)^">^else^<outline text="^opmlEncode(^value($Name)^)^" _status="^value($status)^">^endIf^
^children(/TEMPLATES/OPML-item)^
</outline>^else^
<outline text="^opmlEncode(^value($Name)^)^" _status="^value($status)^"/>^endIf^ 


We don't need to opmpEncode the value of $status as it is only ever checked (or no value).
Back to top
 
« Last Edit: Mar 27th, 2011, 4:39am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Alex Strick van Linschoten
Full Member
*
Offline



Posts: 61
Holland
Re: Tinderbox for iPad
Reply #7 - Mar 27th, 2011, 3:51am
 
I think I may be being fairly dense as usual but I can't seem to get this to work even on the very basic sample outline provided in the demo.  I've tried it in the original version, as well as on the version with updated template text (as provided by Mark Anderson).

So I open the file, I CMD-Click and select all the parts of my outline (the note 'Sample Outline' and all of its children). I then click File-Export as Text. I then choose the Templates/OPML Doc file as the Text Export Template and choose the 'Selected Notes' radial button on the left. I then click export and choose to save the file as Sample.opml.  And then I try to open the file in OmniOutliner (which also handles outlines) as a test. It says the file is corrupted.
Back to top
 
 
WWW strickvl   IP Logged
Alex Strick van Linschoten
Full Member
*
Offline



Posts: 61
Holland
Re: Tinderbox for iPad
Reply #8 - Mar 27th, 2011, 3:57am
 
Ok one of my export attempts work. It was using the original template files (as posted by Paul Walters). Instead of individually selecting all the notes I wanted to export, I only chose the top-level note entitled 'Sample Outline'.  This opens in OmniOutliner, and also exports through CarbonFin's online service, but it uses the note text as the title of the note. I would have thought it would take each note's Name as the title and then insert the main body text as the text associated with each note? Or is this a false assumption on my part?
Back to top
 
 
WWW strickvl   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OPML (was: Tinderbox for iPad)
Reply #9 - Mar 27th, 2011, 5:18am
 
The OPML templates cited were only designed to export note and all its descendants, using the envelope/letter metaphor; the root note (envelope) uses a recursing template (letter) to include any descendants (each a sheet of the resulting letter).

If you select all items in a branch of the outline, or in different branches, you'll get envelopes nested in envelopes thus likely 'corrupt' OPML.

If you want to export several discrete hierarchies in one OMPL file you'll need to write a slightly more complex template. Exactly what that is will depend on any (unstated) logic in you export plan (e.g. are the top ('root') notes of each exported branch at the same level, do all descendants of an export root export, etc.?)

The reason the export via Paul's original note flips title/text is that is the way the templates were written.  Looking at his TBX, I'm guessing the note titles ($Name) weren't intended for export.

Noting first that OPML is a loosely defined standard, i.e. apps may do their own thing (e.g. Omni's non-standard '_note' attribute for note text), if you want templates that give 'standard' output I'd suggest trying the ones I posted up-thread. With my template bear in mind that their intended to export a note and all it's descendants.

I've a quick workaround for the latter constraint where you want to export several branches. First export each as a separate OPML file, them open all in TextWrangler (or decent text editor - not word processor). Now for the second and subsequent files, delete all the lines from the first up to and including the <body> tag, plus the line from the </body> tag to the end of the file. Now, take what's left of the contents of file #2 and paste it in file number #1 immediately before the </body> tag. Repeat for file #3, etc. Now #1 is a single OPML with all the data.
Back to top
 
 

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



Posts: 136
North Carolina
Re: OPML (was: Tinderbox for iPad)
Reply #10 - Mar 27th, 2011, 4:22pm
 
Uh, although this thread is no longer about iPad to TBX using OPML (i.e. OPML importing), now that it's active again I want to add another endorsement:  Outliner Pro.  The interface of this app doesn't have a polished look (no animations!!!), but it exports an OPML that puts notes into Tinderbox notes, plus it's entirely gesture-based.  That's cool!
Back to top
 
 
  IP Logged
Derek Van Ittersum
Full Member
*
Offline



Posts: 168

Re: OPML (was: Tinderbox for iPad)
Reply #11 - Mar 28th, 2011, 11:06am
 
Hi Jean,

I can't find the app you mentioned in the previous post.  Can you link to it?

Thanks!
Back to top
 
 
  IP Logged
Jean Goodwin
Full Member
*
Offline



Posts: 136
North Carolina
Re: OPML (was: Tinderbox for iPad)
Reply #12 - Mar 28th, 2011, 6:05pm
 
Sorry about that--got the name wrong:

http://itunes.apple.com/us/app/simple-outliner/id331093728?mt=8

There's a free version, so it's easy to try.
Back to top
 
 
  IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: OPML (was: Tinderbox for iPad)
Reply #13 - Apr 3rd, 2011, 7:09am
 
I noticed today I had neglected to subscribe to this topic and didn't respond timely to Mark A's skillful revision to the code in my sample file, Jean's excellent suggestions, and Alex's concerns.  I'll undertake to upgrade my example file and repost it here.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OPML (was: Tinderbox for iPad)
Reply #14 - Apr 3rd, 2011, 9:53am
 
Re the '_status' (non-standard) OPML attribute used by OO and other OMPL outliners to store tick-box states, I think the plan is to map that to existing system attribute $Checked. NOt so as at v5.8.1 but probably soon. Anyway, if you use the built-in $Checked rather than my earlier suggestion of a user $IsComplete you'll be well set up for an improvement in due course.

Apologies about this threads's titling. It started in Feature Suggestions re iPad but then clearly became an OPML export topic. So I split the thread and moved it (in my forum admin' hat'). An unexpected side effect is that the forum eat the first half of the thread which should have remained in the original sub-forum & with the original thread name. Anyway, this thread is now about OPML.  Smiley

[edit for typo]
Back to top
 
« Last Edit: Apr 25th, 2011, 7:41am by Mark Anderson »  

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