I’ve DIY’d that in Python/jinja with some helper functions. Do you know of any templating language that includes this?