Hey all,
I have a couple scripts I'd like to write -- I think they're pretty simple,
but I'm new to python and leo
If anyone can help I'd appreciate it
Script 1 : Creating Children of current based on selected text
Goal: I'd like to
1. get the value of the text that is currently selected
2. create a new node, which has that text as both its headline and body
It was unclear from the tutorial how to just create a new node with
any arbitrary content
3. set that node be a child of the currently selected node
requires: getting the position of the current node
Bonus:
1. Trigger a little popup that lets me put in the value of what I'd like
to name this new child
2. remove the selected text and replace it with the value << 'whatever I
named the new child node in the prompt' >>
-------- I've used the script below to create a clone and move it to a
specific place -- how do I just make a node
p = c.p.clone()
dest = g.findNodeAnywhere(c,'A
')
p.moveToLastChildOf(dest)
c.redraw()
----- Also, what is the best way to discover how to do these kind of things
without asking others?
--
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.