I've been using jinja2 lately, because it's favored by Salt.
http://saltstack.org
There is so much wisdom behind the Salt team that I look to them
for best practice recommendations.
I've been wanting to slip in a plug for Salt, there you go. Of course there
are many very good template systems out there.
My naive take on templates support would be something like:
@template setup.py
name = '{{data.name}}'
...
project foo
data = {'name':'FooProject'}
c.render('@setup.py', data)
A node would declare a template, the template name would be available
to send data for rendering. Maybe the rendered result would be in a vr
pane, maybe a child of the node declaring the data.
I suppose different rendering engines could be accommodated via
@jinja2 setup.py
...
@mako .bashrc
...
On Fri, May 25, 2012 at 8:12 AM, Edward K. Ream <[email protected]> wrote:
> About a year ago at the Ashland sprint Kent (iirc) made the following
> suggestion: solid, simple implementation of one of the standard
> template engines providing intuitive template nodes, variable
> definitions, and rendering options.
>
> This is moving up the to-do list and yesterday's docstring hack
> brought this item to mind.
>
> My question is, how would this work in Leo? Presumably, this can be
> done by creating template-oriented commands.
>
> Your comments and suggestions, please, Amigos.
>
> Edward
>
> P.S. Templates must have exactly *zero* impact on the code that reads
> and writes either .leo files or external files. I shall reject any
> scheme for integrating templates into Leo's read/write code. Don't
> even think about trying to change my mind about this. Experience with
> earlier versions of Leo convinced me that avoiding noweb escape
> sequences was essential. I have never regretted that choice.
>
> EKR
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/leo-editor?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.