Re:Cog resurgence
by linsomniac on Saturday January 15, 2022 @10:08AM
(#29946863)
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.
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.