4 ms·
Looking at this reminds me strongly of texthon, but with a less attractive syntax. A quick skim through the source appears to show a similar use of eval. Too b
by bytK7 5y ago
Looking at this reminds me strongly of texthon, but with a less attractive syntax. A quick skim through the source appears to show a similar use of eval.
Too bad texthon is essentially unknown and unmaintained, as far as I know. I worked on a project with it for several years and it always worked really well and was much more pleasant to use than something like jinja. Maybe I need to make a modern fork…
Anyway, anyone interested in cog should check it out as well.
- masklinn 5y agoTexthon seems like a bog-standard templating langage, nothing to do with cog but in the barest most remote commonalities of executing code to output text.
- bytK7 5y agoYou’re right, I realize now that cog doesn’t process an input template but the actual output file, modifying it in place. Perhaps that why it took so long to gain popularity: that fact seems somewhat non-obvious from the documentation. Even the examples on a cursory glance are not obviously not templates. At least to me. Re-reading the docs I realize that sure enough, they say very clearly what it does. But I think it just doesn’t click immediately. Now that get it, I have a few problems coming to mind that I can solve with cog that I didn’t have a great solution to before. So I’m jumping on the bandwagon.