On Sat, Nov 12, 2011 at 7:56 AM, Edward K. Ream <[email protected]> wrote:
> On Fri, Nov 11, 2011 at 5:30 PM, Edward K. Ream <[email protected]> wrote:
>
>> Look in leoPy.leo::
>>
>>    @file leoImport.py--><< how to write a new importer >>
>>
>> Study this carefully: it tells how to think about the problem.  Then
>> feel free to ask questions here.
>
> It took some time to register what you probably were asking. There are
> two approaches:
>
> 1. Use Leo's new xml importer to import the FreeMind file *as xml*.
> Not likely to be what you had in mind.  But unless you *did* have that
> in mind, my advice to read the docs mentioned above doesn't make much
> sense.  That is, using an xml importer only makes sense if you plan to
> edit FreeMind files as FreeMind source code.
>
> 2.  Use a standard Python xml parser tool (lxml or sax, say) to parse
> the FreeMind file, and then use the parsed representation of the xml
> file to create some *other* representation of the FreeMind data, say a
> graph to be viewed with viewrendered.
>
> Even if you wanted a fairly direct representation of the FreeMind data
> as a Leo outline, it would probably be easier to user lxml or sax to
> create the Leo outline, unless you really want the first approach.
>
> Clear?


I looked at the code a bit in the wee hours this morning.  It's
conceivable it could be used, but right, I'm not looking to extract
functions and classes from a language, just turn the <node> elements
into a Leo tree.  I did the xml import, which is better than a regular
import since the <node> elements are recognized, but they're all
placed in one body text.  I'd need to use particular parameters of the
node elements as the headline and body texts.

At some point I'll look at the sax or lxml stuff.  I looked at sax
briefly awhile ago.

I'm thinking along the lines of using Leo to work with some mindmaps
that have highly redundant data in different files, via clones.

Not exactly thinking of the mindmap graphical interface for this
motivation, though that remains an interest more generally.


Seth

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to