On Tue, Jul 29, 2014 at 10:20 PM, 'Terry Brown' via leo-editor <[email protected]> wrote: > On Tue, 29 Jul 2014 18:20:16 -0700 (PDT) > "Edward K. Ream" <[email protected]> wrote: > >> In short, afaik, importers and writers can create their own kinds of >> @auto nodes, as long as they have unique spellings. > > Yep, just overriding run() and write() makes it very easy to do > whatever you want when @auto-thingy is loaded or saved, with all the > usual triggers for loading or saving - very useful - thanks :)
You're welcome :-) To repeat, we have a great collaboration going. The auto-registration of @auto-names wouldn't have happened without your work yesterday. Only one thing left on the programming list for this project: look in ~/.leo/plugins for importers and writers directory. Note that the spelling is .leo, not leo. Oh yes, one more thing: I'll probably comment out the no-longer-used ctors in the subclasses of BaseScanner and BaseWriter. A couple of things to document: 1. As you know, importers and writers can register either @auto-names or file extensions. I have just verified that @auto x.xyzzy will use both the importer and the writer for the .xyzzy extension, that is, importers/test.py and writers/test.py. So, for *unique* extensions, there is no need to use a separate @auto name, you can just use @auto. 2. Nah: ic.createOutline won't call an importer for empty files. That's just silly. However, if you set trace = True in ic.createOutline, the traces will tell you whether the read failed (file did not exist) or returned an empty file. This should eliminate confusion, especially if your test file isn't empty! 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.
