YunoHost-Apps / Experimental_helpers

6 stars 12 forks source link

Add jinja template helper v2 #111

Closed Josue-T closed 3 months ago

Josue-T commented 3 months ago

Problem

Same than #107 but with a other implementation to pass the variable to python process.

Note that the advantage of this implementation is cleaner. But the advantage of #107 is that is easier extensible with the possibility by example to pass bash array to python so we can iterate over variable directly from jinja.

In theses following case it's quite complicated to implement with the current templates

And the yunohost implementation is not a standard template system

Solution

Use jinja as already used in the core to bring many feature.

I've implemented this on monitorix cf https://github.com/YunoHost-Apps/monitorix_ynh/pull/55 and synapse cf https://github.com/YunoHost-Apps/synapse_ynh/pull/449 and this bring many code simplifications and it just more clear how it work than without this.

alexAubin commented 3 months ago

(Closing because now available in the core with --jinja on ynh_add_config)