On Fri, Mar 1, 2024 at 8:33 PM Thomas Passin <[email protected]> wrote:
> The process for importing any file delegates .csv files to files exported > the MindJet's MindManager program. Using it to import ordinary tabular .csv > data produces unusable results on the samples I tried today. > Thanks for this report. This is a confusing topic. Some notes: - There is no separate importer for .csv files. - The import-file command delegates .csv files to the ic.importFreeMind method, which in turn uses the MindMapImporter command. I would like to have Leo be able to import standard .csv files so I would > like to start a discussion about the subject. > I agree this would be a good idea. It will probably be easy to do. It's too late to do this for Leo 6.7.8. In the meantime, you can write a script that imports directly to text. Here is tested code: import os fn = 'README.md' path = g.os_path_finalize_join(g.app.loadDir, '..', '..', fn) contents = g.readFileIntoUnicodeString(path) last = c.lastTopLevel() p = last.insertAfter() p.h = fn c.importCommands.createOutline(p, ext='.txt', s=contents) c.redraw(p) HTH. 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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0w3aY2QiCTa3r1rsH%2BK-sPjkYBz4BmcCDTihAM%2B%2BzjWA%40mail.gmail.com.
