[ANN] new plugin: jinjarender

14 views
Skip to first unread message

Ville M. Vainio

unread,
Apr 9, 2011, 9:24:03 AM4/9/11
to leo-editor
This is a trivial plugin that demos how to plug in a templating
engine. Jinja2 is Django like engine.


Docstring


''' Render @jinja nodes.

- sudo apt-get install python-jinja2

Create headline like this:

@jinja ~/foo.txt

Select the node and do alt-x act-on-node

Conceptually, acts like @nosent - tree is parsed,
template is expanded and content is written to the file.

Requires "valuespace" plugin. Fetches vars from valuespace.

'''

Jinja2 markup:

http://jinja.pocoo.org/docs/templates/

@path directives are (of course) honored. What kind of mechanism we
will have for rendering multiple template nodes remains to be seen
(act-on-subtree ?)

Edward K. Ream

unread,
Apr 16, 2011, 7:53:06 AM4/16/11
to leo-e...@googlegroups.com
On Sat, Apr 9, 2011 at 8:24 AM, Ville M. Vainio <viva...@gmail.com> wrote:
> This is a trivial plugin that demos how to plug in a templating
> engine. Jinja2 is Django like engine.

The "keeping up with Ville" project never seems to end, and I am
grateful for that :-)

I'll be studying Jinja2 soon.

Many thanks for this work.

Edward

Reply all
Reply to author
Forward
0 new messages