FreeMind and MindJet imports ready for testing

95 views
Skip to first unread message

Edward K. Ream

unread,
May 4, 2016, 6:20:39 AM5/4/16
to leo-editor
This completes #32, which has been closed.

There are two ways to access these commands:

1. Using the general import-files command, via the minibuffer or the File:Import File menu.  This opens a dialog that picks the proper importer based on the file's extension.  mm.html files get the FreeMind importer. csv files get the MindJet importer.

2. If these conventions don't suit you, you can use specific import-free-mind-files or import-mind-jet-files commands. These open a dialog in which the specific extension is pre-selected, but you can pick any file as usual.  In particular, it's possible to use the MindJet importer to open .ipynb files, which have .csv format.

In general, if you pick an invalid file, the importers will fail gracefully.

Please report any problems.

Edward

zhaohe wang

unread,
Feb 21, 2017, 7:34:20 AM2/21/17
to leo-editor
Freemind 1.0.1 Invalid FreeMind file a.mm.html

Please ref attachment file a.mm.html.

Could you help me how to import freemind file? Thanks!

在 2016年5月4日星期三 UTC+8下午6:20:39,Edward K. Ream写道:
a.mm.html

Edward K. Ream

unread,
Feb 22, 2017, 8:07:35 AM2/22/17
to leo-editor
On Tue, Feb 21, 2017 at 6:34 AM, zhaohe wang <wangz...@gmail.com> wrote:

​> ​Could you help me how to import freemind file? Thanks!​
​...​
​> Invalid FreeMind file a.mm.html

This error message is confusing. It hides the following:

Exception importing FreeMind file a.mm.html
Traceback (most recent call last):

  File "c:\leo.repo\leo-editor\leo\core\leoImport.py", line 72, in create_outline
    self.import_file(path)

  File "c:\leo.repo\leo-editor\leo\core\leoImport.py", line 109, in import_file
    d[str(self.count)]['string'] = list(children[0].iterchildren())[0].text

IndexError: list index out of range

I'll fix this today.

Edward

Edward K. Ream

unread,
Feb 22, 2017, 11:02:05 AM2/22/17
to leo-editor
On Wednesday, February 22, 2017 at 7:07:35 AM UTC-6, Edward K. Ream wrote:
On Tue, Feb 21, 2017 at 6:34 AM, zhaohe wang <wangz...@gmail.com> wrote:

​> Invalid FreeMind file a.mm.html

This error message is confusing...I'll fix this today.

Rev 8f40398 completely rewrites the importer.  The new code is dead simple and gives better error messages. Please report any further problems.

The importer shows all html elements contained in the <body> element.  Imo, it would be best to represent nodes with <node> elements, as described here.

The new importer could easily support "body" attributes in <node> elements. I won't add this feature unless somebody actually wants it.

Edward

zhaohe wang

unread,
Feb 23, 2017, 12:24:10 AM2/23/17
to leo-editor
Dear Edward:

I have tested it. Please ref the attachments.
After import test.mm.html: 


only html elements in outline.I think that contents in outline will be ok. Don't you think so?


在 2017年2月23日星期四 UTC+8上午12:02:05,Edward K. Ream写道:
test.leo
test.mm
test.mm.html

Edward K. Ream

unread,
Feb 23, 2017, 2:57:21 AM2/23/17
to leo-editor
On Wed, Feb 22, 2017 at 11:24 PM, zhaohe wang <wangz...@gmail.com> wrote:
 
only html elements in outline.I think that contents in outline will be ok. Don't you think so?

​Yes.  Rev 277d4c3 works as you request.  In addition, it fixes several problems revealed by importing Hello.mm​. In particular, it handles comments reasonably.

Edward
Reply all
Reply to author
Forward
0 new messages