3 ms·
I also immediately thought "why is this not jinja?", but then I realized that jinja cannot do what cog can: run arbitrary Python code. Yes, jinja includes a sm
by linsomniac 5y ago
I also immediately thought "why is this not jinja?", but then I realized that jinja cannot do what cog can: run arbitrary Python code. Yes, jinja includes a small subset of python things as filters, but jinja on purpose does not include arbitrary code.
Typical jinja use is you have a controller or some outside code like Ansible that creates objects for jinja to operate on.
Cog is less like PHP templating, or jinja, and more like a standalone jupyter static text generator.