Show HN: A templating engine for *.docx files (written in Clojure)
github.comHi, I work for a small company creating insurance software (dealing with lots of insurance policy documents, offers, legal documents, etc). I created this library to make creating and editing document templates easier. Now we can turn a custumer's document into a document template in just minutes.
I wrote the core of the library in Clojure. It turned out that Clojure's data.xml is a great way to deal with immutable XML trees.
- source: https://github.com/erdos/stencil - documentation: https://erdos.github.io/stencil/
I am happy to answer questions and receive feedback about this project.
Cool! I built something very similar in Python for a client project, for filling docx forms from a JSON key-value. My approach was a bit different. In order to preserve formatting, I did not want to put the templating language in the document itself. So I used commenting functionality. The user highlights the region to insert text, and puts the templating logic in the comment. Interesting to see another implementation! Thanks