Alternatives and related projects¶
This document presents other projects that provide similar or complementary functionalities. It focuses on differences with diecutter.
Note
This document reflects diecutter’s authors point of view, which is, inherently, a partial one. Contact authors if you feel something is wrong.
paster create¶
PasteScript [1] provides a paster create command to generate files from templates.
Diecutter’s authors tried PasteScript, and found it too complicated for most use cases. They felt that the more they generated files with PasteScript, the more they spent time on PasteScript’s specific stuff. With diecutter, they tried to focus on using templates to generate files.
Let’s highlight some differences between PasteScript and diecutter:
PasteScript | diecutter |
---|---|
paster create is a command. Runs on local machine. You need PasteScript installed on every computer (or project) where you use templates. | Diecutter is a web service. You can use a shared diecutter server, but it is also easy to deploy on a local machine. |
You have to register templates:
|
You PUT files just like in a filesystem. |
You distribute templates in Python packages. | You carry templates (folders and files) as you like. No packaging. |
Can collect input data via interactive shell prompts. | No builtin client (that’s part of the Vision). Listing variables isn’t implemented yet (that’s part of the plans). |
You declare sets of templates. You can’t render only some part of it, you have to render the whole set. | You can render a directory as a set, but you can also render any single part of it, individually. |
Templates are Python classes. That allows developers to implement various tasks in hooks. | Uses only templates. Even to dynamically generate folders. |
Asks you whether to ovewrite files in output directory, and even shows you the diff! | That’s not a job for diecutter. You can do that (better) with Git, Mercurial and many other tools. |
Uses Cheetah [2] template engine. | Currently uses Jinja [3]. Later, diecutter will support several template engines. |
Not only about generating files. PasteScript is a big project that does several things. | Focuses on generating files. |
collective.generic.webbuilder¶
collective.generic.webbuilder [4] is a file generation service, built on top of paster create. It is a web interface to paster create.
Thus, some differences are directly related to paster create, such as you define sets of templates, or have to register templates (collective.generic.webbuilder uses ZCML [5]).
Collective.generic.webbuilder inspired diecutter.
Diecutter’s authors felt that collective.generic.webbuilder is a tool made by paster users, for paster users. Mostly developers. With diecutter, they tried to make things easy for most users, but flexible for users who have specific needs.
Puppet, Chef and other provisioners¶
Provisioning tools, such as Puppet, Chef or Salt (just to name a few), use templates to generate configuration. They also do many other things.
Diecutter only deals with templates and file generation.
Templates and file generation aren’t only a matter of provisioning. There are many situations where you need templates, and where provisioners would be overkill.
Diecutter also tries to make it easier to migrate from one provisioner to another. Provisioners are often tied to one template engine, one layout and one deployment process. Those items differ from one provisioner to another. With diecutter, which plans to support several template engines, you could easily use the same templates whatever the provisioner or deployment procedure.
References
[1] | https://pypi.python.org/pypi/PasteScript/ |
[2] | http://www.cheetahtemplate.org/ |
[3] | http://jinja.pocoo.org/ |
[4] | https://pypi.python.org/pypi/collective.generic.webbuilder/ |
[5] | http://docs.zope.org/zope.component/zcml.html |