Add ability to generate the template with a callback function
Merge pull request #11 from Ulflander/master

Add ability to generate the template with a callback function