jw-pkg/src
Jan Lindemann 7edf5a4c26
cmds.projects.lib.templates: Add module

Add tmpl_render(), a function to provide a primitive template renderer. It takes a dictionary for values to replace variables shaped {some-variable} in templates found by their name. For now, the templates are defined in the templates module instead of being read from a template directory. The values may be lists, in which case they are rendered with a delimiter, defaulting to ",".

Using an existing template engine like jinja2 is tempting but would introduce additional dependencies jw-pkg is trying hard to avoid.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 17:52:20 +02:00
..
python cmds.projects.lib.templates: Add module 2026-05-31 17:52:20 +02:00
Makefile projects.py: Move bulk of code into module 2025-11-15 11:08:52 +01:00