Skip to main content

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.0rc1 - 2008-07-04
-------------------

* Initial release.
[wichert]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.recipe.template-1.0rc1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file collective.recipe.template-1.0rc1.tar.gz.

File metadata

File hashes

Hashes for collective.recipe.template-1.0rc1.tar.gz
Algorithm Hash digest
SHA256 4356def44275fae7cb56133e69fdcb490a1036027161de714e8aecba8fba90de
MD5 17c05f91f9cda0220edddbfb314b367c
BLAKE2b-256 b0ca4ac3b997dbc90a847295c03168dce902f8077c6167e20ba8ce8b073a609b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page