Import freemind files into leo

74 views
Skip to first unread message

Fred

unread,
Jun 18, 2018, 11:46:44 AM6/18/18
to leo-editor
Hi there,

Could someone please let me know how to import a Freemind file into leo ?

With Leo 5.7.3 on OS X:
- "Import Files"/"Import FreeMind Files" will not display the standard file selection box. Looks like nothing really happens.
- "Import Files"/"Import Any File" the dialog box will show up, then if I select a Freemind (*.mm) file it will show up in an "Imported Files" folder within the leo file, in a "@auto" node.

Thanks much for your help.

Fred

Edward K. Ream

unread,
Jun 18, 2018, 12:04:26 PM6/18/18
to leo-editor
On Monday, June 18, 2018 at 10:46:44 AM UTC-5, Fred wrote:

> Could someone please let me know how to import a Freemind file into leo ?

Try the import-free-mind-files command.

Issue #32 discusses this command.  I had forgotten it existed.  The present command opens a dialog asking for one or more files.

This approach would be clumsy if you have a lot of files to import. A straightforward script (not written yet) could create a list of files to be imported, and then import those file.  Let me know if you could use this script.

Edward

Fred

unread,
Jun 19, 2018, 3:48:10 AM6/19/18
to leo-editor
I've tried the import-free-mind-files command but nothing happens when I type the command in the minibuffer (followed by the full path to the file I want to import).
I just see the name of the command echoing in the "completion" tab and nothing in the "log" window.

What am I missing ? I have installed leo with git, and it looks perfectly ok otherwise.

Edward K. Ream

unread,
Jun 19, 2018, 5:34:34 AM6/19/18
to leo-editor
On Tue, Jun 19, 2018 at 2:48 AM, Fred <frederic...@gmail.com> wrote:
I've tried the import-free-mind-files command but nothing happens when I type the command in the minibuffer (followed by the full path to the file I want to import).
I just see the name of the command echoing in the "completion" tab and nothing in the "log" window.

​You should see a dialog.  Did you type <return> to start the command?

Edward

Edward K. Ream

unread,
Jun 19, 2018, 5:42:10 AM6/19/18
to leo-editor
Hmm.  It appears that the minibuffer is broken.  Guess that's what happens when I go on vacation...  I'll fix this immediately.

Edward

Edward

Edward K. Ream

unread,
Jun 19, 2018, 5:47:12 AM6/19/18
to leo-editor
On Tue, Jun 19, 2018 at 4:42 AM, Edward K. Ream <edre...@gmail.com> wrote:


On Tuesday, June 19, 2018 at 4:34:34 AM UTC-5, Edward K. Ream wrote:


On Tue, Jun 19, 2018 at 2:48 AM, Fred <frederic...@gmail.com> wrote:
I've tried the import-free-mind-files command but nothing happens when I type the command in the minibuffer (followed by the full path to the file I want to import).

​Sorry for the confusion.  The minibuffer isn't broken :-)

Just type <alt-x>import-fr<tab><return> to start the command.  You should then see the dialog.

Edward

Frederic Fichter

unread,
Jun 19, 2018, 6:00:02 AM6/19/18
to leo-e...@googlegroups.com
OK, Completion shows the following: 

  import-MORE-files
   import-file
   import-jupyter-notebook
   import-mind-jet-files
   import-tabbed-files
   import-zim-folder

Looks like the freemind import is simply not available on my system ?

Fred

--
You received this message because you are subscribed to a topic in the Google Groups "leo-editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leo-editor/RiXC_jxo68g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Edward K. Ream

unread,
Jun 19, 2018, 6:07:54 AM6/19/18
to leo-editor

On Tue, Jun 19, 2018 at 4:59 AM, Frederic Fichter <frederic...@gmail.com> wrote:

Looks like the freemind import is simply not available on my system ?

​The command uses the lxml package.  It should be available if you install it.

I have just created #929, suggesting that ElementTree should be used instead of lxml. ElementTree is more widely available.

Experiments yesterday show that, for example, icon data is not imported.  Not sure whether that is relevant...

These kinds of little-used features get attention only when somebody actually uses them.  Let me know if you like improvements.

Edward

Frederic Fichter

unread,
Jun 19, 2018, 4:33:56 PM6/19/18
to leo-e...@googlegroups.com
I was missing lxml, as you said. So I exported my Freemind file as html. And then I imported the result in leo.

All the HTML tags are imported as node titles, and the actual text of the Freemind node is imported as the node content. Which is probably useful in some cases, Looks like this, in leo (since that is what we have in the HTML file), with "ul" and "li" being node titles:

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

--

Edward K. Ream

unread,
Jun 22, 2018, 8:44:52 AM6/22/18
to leo-editor
On Tue, Jun 19, 2018 at 3:33 PM, Frederic Fichter <frederic...@gmail.com> wrote:
I was missing lxml, as you said. So I exported my Freemind file as html. And then I imported the result in leo.

​I think the importer is designed to work with .mm files.  In any case, please send me what you have so I can take a look.

Edward

Thomas Passin

unread,
Jun 22, 2018, 4:52:04 PM6/22/18
to leo-editor
Good move, since ElementTree is included in the standard Python distro (there was a time when it wasn't).

Terry Brown

unread,
Jun 22, 2018, 5:11:35 PM6/22/18
to Leo list
On Fri, Jun 22, 2018 at 3:52 PM Thomas Passin <tbp1...@gmail.com> wrote:
Good move, since ElementTree is included in the standard Python distro (there was a time when it wasn't).

It's possible the plug-in's old enough to pre-date the inclusion of ElementTree in Python.

It's also possible that the plugin uses XPath, which I don't think Python's ElementTree fully supports.  In some ways I think lxml is one of a small group of non-standard modules (like requests, dateutil) that fill such major gaps in certain Python libraries (XML without XPath, generic date parsing, simple HTTP request handling) that I at least don't feel much compunction about using them.  That said, it would be nice if it worked out of the box and probably not that hard to do without full XPath support... maybe it doesn't even use it.

Cheers -Terry
 
On Tuesday, June 19, 2018 at 6:07:54 AM UTC-4, Edward K. Ream wrote:


On Tue, Jun 19, 2018 at 4:59 AM, Frederic Fichter <frederic...@gmail.com> wrote:

Looks like the freemind import is simply not available on my system ?

​The command uses the lxml package.  It should be available if you install it.

I have just created #929, suggesting that ElementTree should be used instead of lxml. ElementTree is more widely available.

Experiments yesterday show that, for example, icon data is not imported.  Not sure whether that is relevant...

These kinds of little-used features get attention only when somebody actually uses them.  Let me know if you like improvements.

Edward

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages