Replies: 1 comment
-
|
I prefer not to do this first because there are a lot of projects that do not need to render templates, but also because utemplate's syntax is not very intuitive. If I was going to maintain my own template engine it, I would use a more familiar syntax based on well known formats such as Jinja or Handlebars. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering if it would make sense to add the
CompilerandLoaderclasses from utemplate into utemplate.py.Paul Sokolovsky, pfalcon, has some great stuff for sure. I encountered and learned from his picotui code a while back.
However, it seems that the repo has 2 contributors, and hasn't been updated since 2021.
The library consists of a
Compilerclass and 3Loaderclasses that inherit from each other, which I renamed here asCompiledLoader,SourceLoaderandLoaderso it works as a single file, for a total of 223 lines -I see that microdot uses the
Loaderversion that is last here, and wasn't renamed in the snippet, so it could make for even less code if theLoaderclasses are merged.This would allow to keep utemplates updated and upgraded (htmx integration?) as microdot's internal micro template engine.
The original utemplate is under MIT license.
What do you think?
Thanks,
Eli
Beta Was this translation helpful? Give feedback.
All reactions