On Wed, 01 May 2013 13:07:26 -0400
Jacob Peck <[email protected]> wrote:

> similarly structure data.  I set out to make a way of defining a 
> template, and providing macro expansions within the template, so that 
> the user could click a script button, be prompted for data, and be 
> rewarded with a fully-populated copy of the template.  I've managed to 
> accomplish this with the code below:
[snip[
> 1.) Did I re-implement something Leo already does?
> 2.) Anyone have any suggestions on reducing the amount of code/any fixes?

Haven't looked at it hard enough to evaluate code, but it doesn't seem
too excessive for what it does.  I've just been fiddling with the
abbreviations code which does template expansion, but it's aimed at
being more interactive, not having the content stored in the outline,
which makes more sense for you seeing you want to be able to re-run the
template fill-in easily if you make a mistake, without entering
everything again.

I'm not sure how much of this you could achieve with the value-space
plugin, can't remember if that uses Jinja templates for something or
not.

Cheers -Terry

-- 
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 http://groups.google.com/group/leo-editor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to