Allow Jinja2 templates in Notifier attach: #616
jonp92
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I built a small python program that extracts .pngs from .gcodes when uploaded to my klipper server and then copies those to my web server in order to be attachable to a notification. The issue is I would like to be able to use the following Jinja2 template to resolve the correct file name which is based on the filename that was used to upload. Example:
The file name uploaded was 3dbenchy.gcode
[notifier print_start]
url: signal://ip:port/10digitphonenumber
events: started
body: "Your printer started printing '{event_args[1].filename}'"
title: Started Print
attach: http://webserverip/klip_thumbs/{event_args[1].filename | replace(".gcode", "")}.png
which I would expect to resolve to http://webserverip/klip_thumbs/3dbenchy.png
Beta Was this translation helpful? Give feedback.
All reactions