Allow editor to set variables
thibaultamartin opened this issue · 0 comments
thibaultamartin commented
Hebbot supports a template file with a jinja-like syntax. It supports a given list of variables corresponding to the actual news reports and various information.
Sometimes, the editors may want to add a placeholder in the template for something that is going to be updated every week (e.g. a link to a YouTube embed video).
It would be nice to have the following set of commands:
!var set <key> "<value>"
so{{<key>}}
in the template is replaced by<value>
when the editor issues!render
!var unset <key>
to unset the variable!var list
to list all the variables set, and their corresponding value
I think it could also make sense to unset all the variables when the editor issues a !clear
command