www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - template library like Jinja

reply Tobias Pankrath <lists pankrath.net> writes:
Is there any template library like Jinja? (jinja.pocoo.org).

I'm pretty sure we can do even better by leveraging CTFE and a 
precompiler, but speed is no concern for me.
Nov 20 2012
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-11-20 12:38, Tobias Pankrath wrote:
 Is there any template library like Jinja? (jinja.pocoo.org).

 I'm pretty sure we can do even better by leveraging CTFE and a
 precompiler, but speed is no concern for me.

vibe.d uses Jade templates. Jade: http://jade-lang.com vibe.d: http://vibed.org -- /Jacob Carlborg
Nov 20 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-11-20 14:31, Tobias Pankrath wrote:

 I don't want to generate xml/html but code. :-)

Isn't Jinja for HTML? It looks like it is. -- /Jacob Carlborg
Nov 20 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-11-20 16:25, Tobias Pankrath wrote:

 Except for (optional) html escaping it has no special support for any
 text format. HTML is the biggest use case though.

Ok, I didn't know that. -- /Jacob Carlborg
Nov 20 2012
prev sibling next sibling parent Tobias Pankrath <lists pankrath.net> writes:
On 20.11.2012 13:48, Jacob Carlborg wrote:
 On 2012-11-20 12:38, Tobias Pankrath wrote:
 Is there any template library like Jinja? (jinja.pocoo.org).

 I'm pretty sure we can do even better by leveraging CTFE and a
 precompiler, but speed is no concern for me.

vibe.d uses Jade templates. Jade: http://jade-lang.com vibe.d: http://vibed.org

I don't want to generate xml/html but code. :-)
Nov 20 2012
prev sibling next sibling parent Tobias Pankrath <lists pankrath.net> writes:
On 20.11.2012 15:15, Jacob Carlborg wrote:
 On 2012-11-20 14:31, Tobias Pankrath wrote:

 I don't want to generate xml/html but code. :-)

Isn't Jinja for HTML? It looks like it is.

Except for (optional) html escaping it has no special support for any text format. HTML is the biggest use case though.
Nov 20 2012
prev sibling next sibling parent "Masahiro Nakagawa" <repeatedly gmail.com> writes:
On Tuesday, 20 November 2012 at 11:38:46 UTC, Tobias Pankrath 
wrote:
 Is there any template library like Jinja? (jinja.pocoo.org).

 I'm pretty sure we can do even better by leveraging CTFE and a 
 precompiler, but speed is no concern for me.

I'm not familiar with Jinja. So I may not meet your expectation, but I have the D version of Mustache template engine. https://github.com/repeatedly/mustache4d http://mustache.github.com/ Masahiro
Nov 21 2012
prev sibling parent Tobias Pankrath <lists pankrath.net> writes:
On 21.11.2012 21:56, Masahiro Nakagawa wrote:
 On Tuesday, 20 November 2012 at 11:38:46 UTC, Tobias Pankrath wrote:
 Is there any template library like Jinja? (jinja.pocoo.org).

 I'm pretty sure we can do even better by leveraging CTFE and a
 precompiler, but speed is no concern for me.

I'm not familiar with Jinja. So I may not meet your expectation, but I have the D version of Mustache template engine. https://github.com/repeatedly/mustache4d http://mustache.github.com/ Masahiro

Nov 21 2012