Buildout recipe to generate a text file from a template
Project description
Introduction
This recipe can be used to generate textfiles from a (text) template.
A short example:
[buildout] parts = zope.conf [message] recipe = collective.recipe.template input = templates/message.in output = /message mymessage = Hello, World!
In the template you can use the exact same variables as you can use in the buildout configuration. For example an input file can look like this:
My top level directory is ${buildout:directory} Executables are stored in ${buildout:bin-directory}
As an extension to the buildout syntax you can reference variables from the current buildout part directly. For example:
My message is: ${mymessage}
Why another template recipe?
Both iw.recipe.template and inquant.recipe.textfile claim to do the same thing. I have found them to be undocumented and too buggy for real world use, and neither are in a public repository where I could fix them. In addition this implementation leverages the buildout variable substitution code, making it a lot simpler.
Changelog
1.0 - 2008-10-16
Copy the mode of the input file to the output file. This makes it possible to create executable scripts. [wichert]
Add missing link in README. [wichert]
1.0rc2 - 2008-07-04
Add a MANIFEST.in with instructions to include docs/, otherwise the package will not install. [wichert]
1.0rc1 - 2008-07-04
Initial release. [wichert]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.recipe.template-1.0.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae0659b6a9f95477238e0b170484fde02d830abe2054eb5477916fae570e567e |
|
MD5 | f212adc9b9dfff940d503a394604a77f |
|
BLAKE2b-256 | b91f76bcb6cb5b7c72ea1f83d9e88b8af43d67033be3b2fc5117e93405f2dc8f |