Status (master branch)
This is a jinja2 extension to execute system/shell commands from a template.
WARNING: be sure to valid any string submitted to this filter as you can open security holes with it
The syntax is 'full_command_with_args'|shell([die_on_error_boolean_flag], [encoding])
.
from jinja2 import Template, Environment
# We load the extension in a jinja2 Environment
env = Environment(extensions=["jinja2_shell_extension.ShellExtension"])
# For the example, we use a template from a simple string
template = env.from_string("Mon, 28 Oct 2024 08:46:32 +0000
")
result = template.render()
# example: result == "Fri, 31 Jan 2020 13:35:56 +0100"
# [...]
See CONTRIBUTING.md file.
See CODE_OF_CONDUCT.md file.
(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)