I've done some Leo development, both plugins and internals.  I'm not very 
familiar with most of Leo and not at all with this plugin.  If you can get 
an email to me at my gmail address, I'll send you the email I actually want 
to use, and maybe we can make some progress.

On Wednesday, August 31, 2022 at 5:52:38 PM UTC-4 chr...@gmail.com wrote:

> tbp1...@gmail.com <https://groups.google.com/>, I don't know if you are a 
> developer or member of the Leo team, so I'm not sure if the info I'm 
> sending is useful, please let me know. 
>
> You may already know about this, but there are two leoOPML.py settings 
> that were implemented for the integration of body text into the OPML file:
>     @bool opml_use_outline_elements = True
>     @bool opml_write_body_text = True
>
> and the one about writing <v> elements (why? I know nothing about vnodes 
> etc., but I suppose they're useless outside of Leo, so they have no place 
> in OPML)
>     @bool opml_write_leo_globals_attributes = False
>
> It seems no XML schema or DTD means anything goes with the names of 
> attributes in OPML. One of the outliners I tried offered the possibility of 
> changing the name of the first outline attribute  in its .ini file for OPML 
> import/export. I found this clever.
> OmniOutliner Pro follows the spec 2.0 for the first attribute, calling it 
> "text", and then it's the names of columns for further attributes.  leoOPML 
> currently would uses <leo:body> for the body text, apparently. I suppose 
> accepting anything that comes in for that "body text" second attribute 
> during import and keeping it for export would be a good idea. If the file 
> is first exported by Leo, then of course <leo:body> is fine. Additional 
> @settings could be used to clarify this, or maybe not. I hope I'm not 
> making a fool of myself here...
>
>
> On Wednesday, August 31, 2022 at 5:06:53 PM UTC+2 tbp1...@gmail.com wrote:
>
>> Here is Dave (Winer)'s spec <http://opml.org/spec2.opml>.  I would think 
>> that there would be an XML schema (or maybe a DTD would be able to the the 
>> joib) somewhere that could be used for validating an OPML file, but I 
>> didn't find one in a very hasty search.
>>
>> Since OPML only includes what Leo calls headline text, I'm wondering if 
>> there would ever be any use for text in (Leo) node bodies.  An OPML outline 
>> node can contain other information besides the headline text, so maybe 
>> that's why the plugin may deal with Leo's user attributes - the info has to 
>> go somewhere.  
>>
>> Is it the case, @chr, that you want to round-trip OPML files with other 
>> applications with full fidelity (except maybe data about an editor's 
>> state)?  Or do you only need to include a subset of information?
>>
>>
>>
>> On Wednesday, August 31, 2022 at 10:13:37 AM UTC-4 chr...@gmail.com 
>> wrote:
>>
>>> I found only one public one at http://validator.opml.org/ (website and 
>>> validator by Dave Winer, the original OPML guy, still at the wheel), but it 
>>> doesn't seem to work so well.
>>> I submitted an issue at 
>>> https://github.com/scripting/opml.org/issues/6#issue-1357384900
>>>
>>>
>>> On Tuesday, August 30, 2022 at 6:18:50 PM UTC+2 tbp1...@gmail.com wrote:
>>>
>>>> Shouldn't be hard to adjust the output format, I would think (not 
>>>> knowing anything about the actual plugin).  Do you know of an OPML 
>>>> validator so potential fixes could be tested?
>>>>
>>>> On Tuesday, August 30, 2022 at 12:11:37 PM UTC-4 chr...@gmail.com 
>>>> wrote:
>>>>
>>>>> That's what I did, and the resulting file was not OPML. Check my 
>>>>> previous message: 
>>>>> https://groups.google.com/g/leo-editor/c/bV98DK9QtPI/m/m7bLQioQCgAJ
>>>>>
>>>>> On Tuesday, August 30, 2022 at 5:07:08 AM UTC+2 tbp1...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> Without knowing anything about the plugin, it looks like the 
>>>>>> signature of fc.write_leo_file() is currently not the signature the 
>>>>>> plugin thinks it is.  I'd try commenting out the extra params in the 
>>>>>> plugin, and see what what you get:
>>>>>>
>>>>>>     ok = self.c.fileCommands.write_Leo_file(
>>>>>>         fileName#,
>>>>>>         #outlineOnlyFlag=not self.opml_write_derived_files,
>>>>>>         #toString=False, toOPML=True
>>>>>>         )
>>>>>>  
>>>>>> You would have to restart Leo, or run a new Leo session, to try the 
>>>>>> changes out.
>>>>>> On Monday, August 29, 2022 at 6:15:29 PM UTC-4 chr...@gmail.com 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> If you want you can skip to "*Problem*" below.
>>>>>>>
>>>>>>> I'm new to Leo  but not to Python, and not to the world. For 30 
>>>>>>> years, I've been trying to recapture the magic of MORE (and 
>>>>>>> ThinkTank...) , 
>>>>>>> but on Windows (had to switch in 1989, never used a Mac since).  No 
>>>>>>> way. 
>>>>>>> Recently got fed up, got a Mac Mini M1, an iPhone and iPad, bought 
>>>>>>> OmniOutliner,  but I now only use it on IOS to exchange OPML files with 
>>>>>>> Windows because _BREVITYALERT_.  Even though I got to a decent level in 
>>>>>>> Python, I never tried LEO because  _BREVITYALERT_
>>>>>>>
>>>>>>> But THIS IS THE ONE. Wow!
>>>>>>>
>>>>>>> *Problem*
>>>>>>> Of course, my first message is also about a problem. I'm pretty sure 
>>>>>>> I got the leoOPML.py plugin configuration right (file, tree, 
>>>>>>> directives, 
>>>>>>> body panel), but when I type *write-opml-file* in the mini-buffer 
>>>>>>> (and by the way this procedure seems to be nowhere on leoeditor.com 
>>>>>>> or davy39.github.io/leo-editor/apidoc/leo.plugins.html. Thanks, 
>>>>>>> Google), 
>>>>>>> I get this:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *Traceback (most recent call last):  File 
>>>>>>> "C:\Python310\lib\site-packages\leo\core\leoKeys.py", line 2521, in 
>>>>>>> callAltXFunction    func(event)  File 
>>>>>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 346, in 
>>>>>>> writeOpmlCommand    c.opmlCommands.writeFile(fileName)  File 
>>>>>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 319, in 
>>>>>>> writeFile    ok = self.c.fileCommands.write_Leo_file(TypeError: 
>>>>>>> FileCommands.write_Leo_file() got an unexpected keyword argument 
>>>>>>> 'outlineOnlyFlag'*
>>>>>>>  everytime, either with my own narrow set of parameter plugins or 
>>>>>>> with the one in leosettings.leo.
>>>>>>>
>>>>>>> I went through the plugin code, tried to remove line 321, but then 
>>>>>>> *Tostring=False*  became unexpected too. Then I tried to learn 
>>>>>>> about *c.filecommands*, but I thought it better to join the group 
>>>>>>> and write this. 
>>>>>>> ???
>>>>>>>
>>>>>>> Thanks in advance for help,
>>>>>>>
>>>>>>> Chris
>>>>>>>
>>>>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/be025c17-0c5f-4c81-973e-828338c874b4n%40googlegroups.com.

Reply via email to