While version 1.0 of this project exists for over a year now I actually never announced anything. Thus, instead of listing changes since then, lets start from scratch.
Mustache is at its heart a project for the processing of mustache logic-less templates.
It further provides data structures (frames
) for the easy supplication of
values to templates. These further allow (de)serialization into other formats,
with connectors to JSON and YAML (via
TclYAML).
I started the project in mid-2019 when I wanted try out logic-less templates in parts of the (currently stalled) Lspace.
While my initial research found
mustache.tcl
I was not satisfied with that implementation. It co-mingled template parsing
and rendering, with the nested parts of an input template re-parsed over and
over again as a section
would iterate over the sequence supplying the values
for it.
So I wrote my own.
Beyond the separation of parsing and rendering it also provides packages for
data frames
. These are essentially object wrappers around simple (scalar)
values, lists, and dictionaries. Beyond the use here these are possibly also
useful as a common in-memory representation for data serializations,
i.e. structured data formats like
and the like.
The now-done 1.1
release actually extended the set of scalar types to better
match such representations, and added facilities for easier convresion into
such. Built in are conversions to JSON and the tagged list format taken by
TclYAML. For the latter we also
have a deserializer into frames.
The primary site for the project is
with a mirror at
It is, as usual for me, BSD licensed
Happy Tcling.