General purpose data-driven generator.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Templatizer is a general purpose data-driven generator written in Python.

Getting Started

This short guide will help you get started with Templatizer in no time.


  • git clone git://
  • cd templatizer
  • sudo python install


Templatizer can be configured via $HOME/.templatizer which is a simple text file containing one path per line:


These paths are system-wide directories containing one or more Templatizer templates and will be scanned when Templatizer is started.


What would be Templatizer without templates? Nada.

Each template MUST have at least descriptor file with the .templatizer extension in addition to any other files / directories in the template.

The template descriptor is light-weight JSON:


	"name": "test",
		["mkdir -p %NAME%","shell"]
			"%NAMESPACE-OPEN%":"v + '::'",
			"%NAMESPACE-INC%":"v.replace('::','/') + '/'"
  • name is a unique name identifying this template, and it will be used when registering
  • actions contains the files to be generated and shell commands executed in the order they are listed; can contain variables or constants which will be substituted before execution
  • arguments are "lambdas" and receive the value of the associated command line argument as parameter v; each command line argument can have one or more associated key => value pairs
  • constants are "lambdas" which evaluate to a constant value

There are a couple of internal built-in constants as follows:

  • %YEAR% - current year
  • %DATE% - current date in the format %d/%m/%y
  • %TPLDIR% - absolute path to the active template's parent directory

How to use?

Once you have at least one valid template, it's very easy to use and the results are generated relative to the current directory.

templatizer test --name=Hello --namespace=foundation::framework

Available Templates

There's a repository where I'll share my general-purpose templates so be sure to check it out for some real life examples by click right here .


(ordered by priority)

  • unit tests
  • list all available templates
    • allow filter / search (useful for a large number of templates)
  • list all necessary arguments for a template
  • add support for optional arguments with configurable and sensible defaults
  • optional user-friendly GUI using GTK3


  • Fork the project.
  • Make your feature addition or bug fix.
  • Send me a pull request. Bonus points for topic branches.
  • Do not bump the version number.


Copyright (c) 2011, Mihail Szabolcs

Templatizer is provided as-is under the MIT license. For more information see LICENSE.