Workflowy now supports exporting to OPML

Started by Chris Murtland on 6/1/2013
Dr Andus 6/1/2013 4:57 pm
Chris Murtland wrote:
See http://threads2.scripting.com/2013/june/workflowySupportsOpml

Thanks for the heads-up. This is exciting news, but unfortunately I couldn't get it work properly.

Firs Bonsai gave me the following error, when I tried to import the OPML file:

"The XML parser detected an error. An invalid character was found in text content."

I had to manually remove all accented characters, such as á or é, before I could import it.

Then I discovered that the inline notes were not imported. I'm not sure if the problem is with the export or my Bonsai OPML filter.
Dr Andus 6/1/2013 5:20 pm
Dr Andus wrote:
Then I discovered that the inline notes were not imported. I'm not sure
if the problem is with the export or my Bonsai OPML filter.

It looks like the problem may lie with my Bonsai OPML filter (which I downloaded from CarbonFin). When I imported the same OPML file into the CarbonFin web app, saved it, exported it, and re-imported it into Bonsai (using the same filter), the inline notes showed up fine.

I had a similar problem when trying to import .mm files into Bonsai that were originally created in Freeplane. For some reason the inline notes would only show if I first imported Freeplane's .mm file to IThoughtsHD (on my iPad) and then exported into Bonsai as .opml:
http://www.outlinersoftware.com/topics/viewt/4844

Well, at least there is a way to fix this problem, though I'm still not entirely sure what is going wrong and what it is that fixes it.
Dr Andus 6/1/2013 5:40 pm
Just to add to the OPML mystery, when I imported the original Workflowy OPML file into WhizFolder using its latest "importutil" app (http://whizfolders.com/blog/index.php/import-utility-updated-3-2 it made a complete mess of it, jumbling up the hierarchy.

When I imported the second OPML version that was round-tripped through the CarbonFin web app, WhizFolders imported the hierarchy fine, but still without the inline notes.
Alexander Deliyannis 6/2/2013 6:03 am
Dr Andus wrote:
I had to manually remove all accented characters, such as á or
é, before I could import it.

Then I discovered that the inline notes were not imported. I'm not sure
if the problem is with the export or my Bonsai OPML filter.

I suspect that the issue is rather fundamental and relates to the codepage used for the files. You can open the OPML files in a text editor and see at the top of the XML description what encoding they use. I suspect that Bonsai can only recognise the simple latin character set, while Carbonfin recognises others, but encodes everything into this.
Dr Andus 6/2/2013 10:47 am
Alexander Deliyannis wrote:
I suspect that the issue is rather fundamental and relates to the
codepage used for the files. You can open the OPML files in a text
editor and see at the top of the XML description what encoding they use.
I suspect that Bonsai can only recognise the simple latin character set,
while Carbonfin recognises others, but encodes everything into this.

I see... Actually I'm not focusing on the accented characters issue any more, as CarbonFin wasn't able to import those either and I could avoid using them, if necessary (mostly people's names). CarbonFin gave me the error message "Unable to import this outline. Could not decode to unicode - xml encoding was either wrong or missing and UTF-8 didn't work." So I imported the opml file where I manually removed accented characters. I'm more concerned with the other problem, the inability to import inline notes.

Regarding the XML/OPML description, the following happened:

The original Workflowy export file says




Once it's been roundtripped (and fixed) via CarbonFin, it says



So it seems that CarbonFin somehow changed it back to an older format (?), which could also display the inline notes.
Dr Andus 6/2/2013 10:51 am
Dr Andus wrote:
Woops, the forum software removed the mark-ups. Let me try without the brackets then:

Regarding the XML/OPML description, the following happened:

The original Workflowy export file says

?xml version="1.0"?
opml version="2.0"


Once it's been roundtripped (and fixed) via CarbonFin, it says

opml version='1.0'

So it seems that CarbonFin somehow changed it back to an older format (?), which could also display the inline notes.
Dr Andus 6/2/2013 11:25 am
In the meantime I've also come across Joe Pairman's online Workflowy OPML converter (which I'm too scared to try, as my Workflowy data is all very personal stuff):

http://outline2outline.apps.joepairman.com/

He also provides a Python script, which can be run offline (unfortunately I don't know enough Python to be able to run it). However, he says the following about inline note text:

"Note text becomes the value for the _note attribute; a non-standard but common usage, supported by Omni Outliner, CarbonFin Outliner, and Tree. (Fargo can display attributes, including note attributes, in the sidebar.)"

So if I understand correctly, putting the Workflowy OPML file through CarbonFin might actually assign this "_note attribute" which subsequently might become readable in Bonsai?

What I don't get is why the Bonsai filter that is provided by CarbonFin doesn't do the same as the online CarbonFin conversion. I even discovered that my CarbonFin OMPL filter was an older version (01/02/2009), so I replaced it with the latest version (17/11/2009). The only difference between the two is that the older one had encoding="ISO-8859-1", while the new one has encoding="UTF-8" (not sure what the difference is). However, this did not fix either the accented character problem or the inline notes when importing the Workflowy OPML file directly into Bonsai. Anyway...


Dr Andus 6/2/2013 11:42 am
Dr Andus wrote:
He also provides a Python script, which can be run offline
(unfortunately I don't know enough Python to be able to run it).

Here is the link to the Python script:
http://code.joepairman.com/outline2outline/overview
jaslar 6/2/2013 7:07 pm
I just tested the OPML export/import with tkoutline, Notecase Pro, and Fargo.

tkoutline = error message
Notecase Pro = the right pane shows the correct information and hierachy -- but the left pane is completely blank.
Fargo =worked great.
Dr Andus 6/2/2013 7:37 pm
jaslar wrote:
I just tested the OPML export/import with tkoutline, Notecase Pro, and
Fargo.

tkoutline = error message
Notecase Pro = the right pane shows the correct information and hierachy
-- but the left pane is completely blank.
Fargo =worked great.

How about the inline notes though? That's the info that gets lost with the direct Bonsai import.

I also tried Notecase Pro and got the same strange result (inline notes were also lost).
jaslar 6/4/2013 1:21 am
No, Fargo lost the inline notes, too.
Dr Andus 6/4/2013 10:32 am
jaslar wrote:
No, Fargo lost the inline notes, too.

I did wonder actually why Fargo and Little Outliner don't support inline notes, not just for OPML import but in general (considering that they're brand new and developed from scratch). WorkFlowy has got a clear edge in that regard.

For me inline notes are one of the most important features of any single-pane outliner (or at least an ability to view notes in a second pane, like in Bonsai).
Alexander Deliyannis 6/5/2013 4:44 pm
Dr Andus wrote:
In the meantime I've also come across Joe Pairman's online Workflowy
OPML converter (which I'm too scared to try, as my Workflowy data is all
very personal stuff):

Not to contradict you, but I am surprised that you use Workflowy in the first place if you fear about such data...

He also provides a Python script, which can be run offline
(unfortunately I don't know enough Python to be able to run it).

1. Download the Python installer for your system here: http://www.python.org/download/
2. Run the installer; select "Add python.exe to path" to make your life easier afterwards
3. Unzip Joepairmans script to a folder of your choice (make it easy to visit via the command prompt)
4. Open a command window and navigate to the script folder
5. Type "parse_outline.py -h" (without quotes) at the command prompt to get help on using the script

To make things easier still, you can the copy workflowy export file to the same directory so that you don't need to type paths.

However, he says the following about inline note text:

"Note text becomes the value for the _note attribute; a non-standard but
common usage, supported by Omni Outliner, CarbonFin Outliner, and Tree.
(Fargo can display attributes, including note attributes, in the
sidebar.)"

So if I understand correctly, putting the Workflowy OPML file through
CarbonFin might actually assign this "_note attribute" which
subsequently might become readable in Bonsai?

This is my understanding too.

What I don't get is why the Bonsai filter that is provided by CarbonFin
doesn't do the same as the online CarbonFin conversion.

The online converter may be more recent and different in many ways.

I even
discovered that my CarbonFin OMPL filter was an older version
(01/02/2009), so I replaced it with the latest version (17/11/2009). The
only difference between the two is that the older one had
encoding="ISO-8859-1", while the new one has encoding="UTF-8" (not sure
what the difference is).

Very big difference: ISO-8859-1 is the specific "latin 1" character set of 8-bit ASCII encoding. UTF-8 is backwards compatible with this but is much much broader, including all languages covered by Unicode. More here http://en.wikipedia.org/wiki/UTF-8

So a UTF-8 capable system can read ISO-8859-1, but not the other way around.

However, this did not fix either the accented
character problem or the inline notes when importing the Workflowy OPML
file directly into Bonsai.

My impression is that Bonsai is rather old to be UTF-8 compatible (and therefore handle accented characters not covered by ISO-8859-1).

Alexander Deliyannis 6/5/2013 4:53 pm
jaslar wrote:
I just tested the OPML export/import with tkoutline, Notecase Pro, and
Fargo.

tkoutline = error message
Notecase Pro = the right pane shows the correct information and hierachy
-- but the left pane is completely blank.

Should I assume that you have the tree on the right pane and the detail on the left? Otherwise this sounds rather strange.

In respect to importing inline notes I suggest you provide this info to Miro, Notecase Pro's developer at the forum
https://groups.google.com/forum/?fromgroups#!forum/notecase-pro

He is always open to suggestions, and in fact OPML and indented text import-export was added to NC Pro following a discussion in the forum a couple of years back (or more)
steveylang 6/5/2013 10:50 pm
I just tried importing the OPML to OmniOutliner, Tree, and MindNode Lite. By import I mean I pasted the OPML export into TextEdit and saved as a '.opml' file.

All 3 programs were able to read the OPML. But Omnioutliner was the only app that preserved note text.

I for one am just happy there's a good export now for WorkFlowy, I really like it. Luckily I don't even use notes in Workflowy, anything resembling notes just becomes an indented item for me.
Dr Andus 6/5/2013 11:34 pm
Alexander Deliyannis wrote:
Not to contradict you, but I am surprised that you use Workflowy in the
first place if you fear about such data...

Well, Workflowy says "your data is safe with us," while Joepairman says "your data is not safe with me" :) Moreover, I've become dependent on Workflowy (love them to bits), so I don't have a choice but trust them.

Thanks a lot for going into the trouble to provide the Python instructions. I do use a couple of Python scripts with CT, however I'm no good with the command line. I got as fas as getting the help, but couldn't progress beyond that.

Never mind, roundtripping files via CarbonFin web app is pretty quick. You don't even need to buy the iOS app to sign up for it. I'd recommend it to Bonsai users.

Alexander Deliyannis wrote:
jaslar wrote:
>Notecase Pro = the right pane shows the correct information and
hierachy
>-- but the left pane is completely blank.

Should I assume that you have the tree on the right pane and the detail
on the left? Otherwise this sounds rather strange.

There is nothing in the left pane at all, so it seems to be an error. (But I'm not a Notecase Pro user, I was just exploring my options with OPML.)

He is always open to suggestions, and in fact OPML and indented text
import-export was added to NC Pro following a discussion in the forum a
couple of years back (or more)

I did see on his forum that he thought OPML can't handle inline notes (even though some software like Carbonfin + Bonsai clearly can).
Joe Pairman 6/6/2013 2:43 pm
Hi Dr Andus and all,

Nice to find this forum, and I'm happy that my outline2outline page provided some helpful clues to the inline notes at least. A few thoughts that might clarify further:

I've had a quick look at the exported OPML from Workflowy. The main difference from the OPML my script produced was that I used an attribute name of "_note" for the notes, whereas the Workflowy export doesn't have the underscore; the attribute name is just "note". (It seemed to me that _note was the more common usage, though as the OPML standard doesn't cover notes, it's pretty much up to each app's implementation!) So if you're having trouble viewing notes in the Workflowy export file, for example if you open it in Tree, you could just do a find/replace over your OPML file. A quick and dirty way would be to replace:
note="
with:
_note="
A more robust way would be a regex or, to be absolutely sure, an XSL transform!

Regarding the safety of data, indeed, my online tool is inherently insecure as it uses an non-encrypted connection. I looked into the possibility of doing it over HTTPS, but it was too expensive for a hobby project. So that's why I posted the warnings about data security, and I'm glad they were effective. Workflowy uses HTTPS so is more secure in terms of the possibility of data being intercepted.

Regarding the script not working, it does require Python 2.7 or greater (but not Python 3.x). Perhaps that's what the problem was? I'd have liked to do it for Python 3 but I wanted to keep the code the same as for the online tool on Google App Engine, which doesn't support 3.x yet.

Hope that's helpful.

Cheers,
Joe
Dr Andus 6/6/2013 5:58 pm
Joe Pairman wrote:
Hi Dr Andus and all,

Nice to find this forum, and I'm happy that my outline2outline page
provided some helpful clues to the inline notes at least.

Hi Joe - welcome to the forum! Very nice of you to join up and respond to my questions.

you could just do a find/replace over
your OPML file. A quick and dirty way would be to replace:
note="
with:
_note="

Great! This worked! Bonsai is also using the _note variety. Finally I understand what the problem was and how to fix it in a text editor! Thank you very much.

Regarding the script not working, it does require Python 2.7 or greater
(but not Python 3.x). Perhaps that's what the problem was?

I'm sure the script is working fine, I just don't know how to use command line, so it's my fault really. I have Python 2.7.2. But don't worry about this, as doing the find/replace in my text editor is probably a quicker solution for me.
jaslar 6/10/2013 4:15 am
No, the tree on the left, note on the right; the default set-up.
Dr Andus 2/13/2015 11:47 pm
This is probably old news, it's just something I've never needed and so haven't tried until just now, but I just discovered that you can copy the raw OPML code of an outline (in my case exported from CT and opened in Notepad++) and paste that directly into WorkFlowy, and it converts it upon paste into its own outline (i.e. no need for import function, copy and paste does it), with hierarchy correctly rendered and all the XML/OPML markup stripped. That's pretty sweet. I'll start using this more often.