makejinja can be used to automatically generate files from Jinja templates. This allows you to load variables from external files or create repeating patterns via loops. A very interesting use case for this tool is generating config files for Home Assistant: Using the same language that the built-in templates use, you can greatly simplify your configuration. When creating for example dashboards, it allows you to create a view for each room based on a single common template, dramatically reducing the maintenance overhead of complex dashboards. I originally developed this for my smarthome setup, but thought it may be useful for others as well!
A concrete example for Home Assistant can be found in the tests directory: https://github.com/mirkolenz/makejinja/blob/main/tests/data
For more information like detailed features or installation/usage instructions, please visit the GitHub repo.
Comments URL: https://news.ycombinator.com/item?id=34645370
Points: 7
# Comments: 1
Chcete-li přidat komentář, přihlaste se
Ostatní příspěvky v této skupině
Article URL: https://seancoates.com/blogs/matter-and-privacy
Article URL: https://www.bbc.co.uk/news/uk-68663750
Comments URL: https://news.y
Article URL: https://github.com/eduardoleao052/js-torch
Comments URL: https:
Hi HN, We're Luke and Phillip, and we're building Spice.ai OSS - a lightweight, portable runtime, built in Rust and powered by Apache DataFusion to locally materialize, accelerate, and query data
Article URL: https://playedgar.netlify.app/
Comments URL: https://news.ycombinator.com/i