thanks vitalije for the instruction. much appreciated. 

On Saturday, August 24, 2019 at 4:00:21 PM UTC+7, vitalije wrote:
>
> You can try the following:
> def get_child_headlines(c, address):
>     return g.recursiveUNLSearch(address.split('-->'), c)
>
> You can find nodes even faster if you know their gnx (you can obtain a gnx 
> value by using p.gnx or v.gnx). 
> def get_node(c, gnx):
>     return c.fileCommands.gnxDict.get(gnx)
>
> def get_body_and_headline(c, gnx):
>     v = get_node(gnx)
>     return v.h, v.b
>
> I assume that you have obtained the address of the 
> node "IT-->Leo-->Writing Plugin-->Display Message" by copying it from the 
> status line in Leo window. If you want to copy gnx of some node you can do 
> this using the following script.
> g.app.gui.replaceClipboardWith(p.gnx)
>
> This script you can make a button of it and then when you want to copy gnx 
> of some node, just select it and click the button.
>
> HTH Vitalije
>
>
>
> On Saturday, August 24, 2019 at 9:07:44 AM UTC+2, Austin(Xu) Wang wrote:
>>
>>
>> I realized  get_headline ("IT-->Leo-->Writing Plugin-->Display Message") 
>> is with no sense..
>>
>> What I want is:
>>
>> - get_child_headlines ("IT-->Leo-->Writing Plugin-->Display Message")    
>>   # return a list of headlines for each child node.
>> - get_body ("IT-->Leo-->Writing Plugin-->Display Message")                
>>        # return the body text
>>
>>
>> On Saturday, August 24, 2019 at 12:46:07 PM UTC+7, Austin(Xu) Wang wrote:
>>>
>>> Dear Leo User,
>>>
>>> I want to access the headline and body of a specific node inside that 
>>> file using the leoBridge interface.
>>> Is it possible to get the body and headline from the path of that node?
>>>
>>> For example, for one node with headline "Display Message":
>>> /Users/wangxu/Documents/Leo/austin.leo#IT-->Leo-->Writing 
>>> Plugin-->Display Message
>>>
>>> Is it doable to implement function:
>>> - get_headline ("IT-->Leo-->Writing Plugin-->Display Message")
>>> - get_body ("IT-->Leo-->Writing Plugin-->Display Message")
>>>
>>> Please guide me on this..
>>>
>>> BR,Austin
>>>
>>

-- 
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/0c0c0762-06e0-4b8f-a607-8dd57880b7b2%40googlegroups.com.

Reply via email to