On Mon, Dec 8, 2014 at 7:57 PM, Davy Cottet <[email protected]> wrote:

> Hi,
>
> Before knowing Leo, I've been using Zim <http://zim-wiki.org/>as a PIM
> and documentation tool, so I've my last year personal documentation in it's
> format....
> I would like to make an importer for Leo, I think it's not a big deal, but
> I'm not yet very familiar with Leo's API for importers, creating nodes etc.
>

​I just looked at
http://zim-wiki.org/manual/Help/Importing_external_files.html

What I would like to obtain :
> ​ [snip]
>
Could you give me some advices of how to proceed ?
>

​Leo's import machinery is not likely to be of much help, because it is
geared to parsing a single text file.

A script will probably be required.  It could be packaged as a plugin, but
that can be done later.

A good model for what you want to do is c.recursiveImport, which uses the
RecursiveImportController class in leoImport.py.

At present there are a few problems with the recursive import code which I
plan to fix in the next day or so.  In particular, @file nodes that should
be siblings can sometimes end up as parent/children.  This is probably a
bug in the import_dir method.

In any case, the RecursiveImportController class shows the kinds of things
that you may want to do.  Please feel free to ask questions about this
class.  Eventually, we may want to create a ZimImportController class.

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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to