Settings

Theme

Show HN: A templating engine for *.docx files (written in Clojure)

github.com

2 points by erdosjr 7 years ago · 2 comments

Reader

erdosjrOP 7 years ago

Hi, 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.

  • chatmasta 7 years ago

    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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection