> Fair enough, that's an entirely different application.  What I was
> describing was my alternative to clones in the context of python source
> code writing.  For what you're doing I usually use a template language
> like genshi or django-templates which has some sort of include
> mechanism that can pull in often used pieces in multiple places.
>
By my definition, templates create a starting point from something but
don't have the ability to stay in sync. They're useful for many tasks,
not these. I'm not familiar w/ either of those tools you mentioned.

>
> UNL = Universal Node Locater, I think.
>
> They're a kind of special URL, such that in places where Leo accepts an
> URL like  http://example.com/some/page.htmlit will also accept an UNL
> like /path/to/file.leo#headline1-->headline2-->headline3 it should
> shift to headline3 in file.leo, where headline3 is a child of
> headline2 is a child of headline1.
>
> Or if that target node's in the current .leo file, simply
> headline1-->headline2-->headline3
>
> Used to be implemented in the UNL.py plugin but moved into the core to
> eliminate duplication of URL handling code.
>
> Also note the right hand part of the status line at the bottom of the
> Leo gui, that's the UNL for the current node within the current file.
>
> You raise the interesting question, does this code work:
>
> UNL="/home/tbrown/Desktop/Proj/BirdAtlas/db/birddb.leo#'SQL-->twp/blk to 
> county"
> path, UNL = UNL.split("#", 1)
> ok,frame = g.openWithFileName(path, c)
> new_c = frame.c
> found, maxdepth, maxp = g.recursiveUNLSearch(UNL.split('-->'), new_c)
> g.es(new_c.p.h)
>
> that should open a different .leo file (birddb.leo), and select the
> node 'blk to county' under the node 'SQL'.  It basically does that, but
> birddb.leo becomes the active .leo file at the expense of whatever .leo
> file was active when the script started, so there are some issues
> there.  Not bugs, just not an area anyone's explored much.
>
> There are a couple of other plugins and extensions which provide APIs
> from accessing leo data from scripts, but it's not clear to me if you
> are looking for a scriptish solution?
>

Probably not as I have no idea how to write scripts in Leo. Nice to
know about UNLs though, I may have other uses for them. Where are they
documented? You mentioned they were added to Leo's core, that suggests
they're important and potentially useful.

Rob.............

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to