FWIW I might have a use for this as a cheap way of printing out 'scratch'
nodes/subnodes, with indentation. I make things like shopping lists this
way. Having a default scratch HTML file might be a nicer way to do this,
for me at least.
On Thursday, September 11, 2025 at 5:35:34 AM UTC+1 brian wrote:
> @Félix
>
> I updated the leo sample. I created a @metadata node that contains the
> @title and @sub-title nodes. And I moved the @tool-tip into the body.
>
> Attached is the updated leo file.
>
> I've go the @metadata children parsing down. Now I'm working on parsing
> the node body.
> On Wednesday, September 10, 2025 at 11:00:39 PM UTC-4 Félix wrote:
>
>> @Edward @Thomas @jkn
>>
>> Ah! I'm so silly! Here's a much better (and smaller) minimal example
>> who's output can be saved in a file and dragged onto your browser, using
>> vnodes instead of positions. (uncomment that line for bodies too):
>>
>>
>> output = ''
>> indentation = ' '
>> level = -1
>>
>> def doChildren(children, level=0):
>> global output
>> for child in children:
>> indent = indentation * level
>> output += f"\n{indent} <li>"
>> output += f"\n{indent} <b>{child.headString()}</b>"
>> # output += f"\n{indent}
>> <pre>\n{child.bodyString()}\n{indent} </pre>"
>> output += f"\n{indent} <ul>"
>> doChildren(child.children, level + 1)
>> output += f"\n{indent} </ul>"
>> output += f"\n{indent} </li>"
>>
>> output += "<ul>"
>> doChildren(c.hiddenRootNode.children)
>> output += "\n</ul>"
>> g.es(output)
>>
>>
>> @brian I havent had the chance to look at your source leo file... (I
>> didnt notice it, and had only looked at your 'desired output file' oops !!)
>>
>> I now understand your @tool-tip nodes and what you were going for.
>>
>> I'll have some more time in the weekend to make a script that really goes
>> from your leo file example to your 'desired' output HTML file.
>>
>> Again - thanks for your interest in Leo - and sorry for that delay!
>>
>> Félix
>> On Tuesday, September 9, 2025 at 1:29:48 PM UTC-4 Edward K. Ream wrote:
>>
>>> On Tue, Sep 9, 2025 at 11:37 AM brian <[email protected]> wrote:
>>>
>>>> @Félix
>>>>
>>>> I cannot see the suggestions by Edward about merging that
>>>> 'all_root_children' into the commander's generators.
>>>>
>>>
>>> The devel branch now contains the new code. I merged it a few hours ago.
>>>
>>> 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 visit
https://groups.google.com/d/msgid/leo-editor/b8137f1a-8c21-4e18-b06c-a91bf02c0893n%40googlegroups.com.