FMPP is a general-purpose text file preprocessing tool that uses FreeMarker templates. It process entire directories recursively. It can be used for generating complete static websites, source code, configuration files, etc. It can insert data from sources like CSV, XML, and JSON into the generated files. (You can add new kind of data sources in Java.) See the Tutorial for a more concrete introduction.