{ "info": { "author": "Andraz Brodnik", "author_email": "brodul@brodul.org", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Software Development", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Pre-processors" ], "description": "======================\nbrodul.recipe.template\n======================\n\nbrodul.recipe.template is a fork of amplecode.recipe.template, a Buildout recipe for generating files using Jinja2 templates. The recipe configures a Jinja2 environment, by default relative to the Buildout directory, allowing templates to extend and include other templates relative to the environment.\n\nDownloads are available from pypi: http://pypi.python.org/pypi/brodul.recipe.template/\n\n.. image:: https://secure.travis-ci.org/brodul/amplecode.recipe.template.png\n\nBuildout Options\n================\n\n* template-file or input (required): One or more Jinja2 template file paths.\n* target-file or output (required): One of more target file paths. The number of files must match the number of template files.\n* base-dir: Base directory of the Jinja2 environment. Template file paths are relative to this directory. Default is the Buildout directory.\n* target-executable: One or more boolean flags (yes|no|true|false|1|0) indicating the executability of the target files. If only one flag is given it is applied to all target files.\n* eggs: Reserved for a list of eggs, conveniently converted into a pkg_resources.WorkingSet when specified\n* jinja2_filters: custom filter functions separated by white-space\n\nAdditional options are simply forwarded to the templates, and options from all the other parts are made available through ``parts..`` and ``parts[][]``.\n\nLists of Values\n===============\n\nIt is possible for a recipe option to contain one or more values, separated by whitespace. A split filter is available for when you want to iterate over the whitespace separated values in your Jinja2 template::\n\n #!/bin/sh\n {% for cmd in cmds|split %}\n echo \"{{ cmd }}\"\n {% endfor %}\n\nMinimal Example\n===============\n\nfoo.txt is created from foo.txt.jinja2 without any extra options::\n\n [buildout]\n parts = foo\n\n [foo]\n recipe = brodul.recipe.template\n template-file = foo.txt.jinja2\n target-file = foo.txt\n\nLarger Example\n==============\n\nfoo.txt is created from myapp/foo.txt.jinja2, bar.sh is created from myapp/bar.sh.jinja2, the second will be executable, and both templates can utilize the additional options specified::\n\n [buildout]\n parts = foo\n\n [foo]\n recipe = brodul.recipe.template\n base-dir = myapp\n template-file =\n foo.txt.jinja2\n bar.sh.jinja2\n input =\n foo.txt\n bar.sh\n output =\n false\n true\n project_name = Another Example\n author = Me\n\n [bar]\n dashed-value = borg\n value = cash\n\nfoo.txt.jinja2:\n::\n\n {{ parts.bar['dashed-value'] }}\n {{ parts.bar.value }}\n {{ author }}\n\n.. note::\n \n `{{ parts.bar.dashed-value }}` won't work, but you can access it as a dict key.\n\nDashed value in the same part\n=============================\n\nIf there is a dashed-value in brodul.recipe.template part and you would like to reference it, use:\n::\n \n {{context['dashed-value']}}\n\n\nCustom filters\n==============\n\nThe filter function is located in the same directory as the buildout.cfg in a filter.py file. If you want to use more filters separate them with a white space. ::\n\n [buildout]\n parts = foo\n\n [foo]\n recipe = brodul.recipe.template\n input = foo.txt.jinja2\n output = foo.txt\n jinja2_filters = filter.bar\n\n\nChangelog\n=========\n\nSee the CHANGELOG file\n\nLicense\n=======\n\nSee the LICENSE file\n\nTodo\n====\n\n\nWhy this fork\n=============\n\n* there should be an input and output option in buildout (since the '-' in 'target-file' char is parsed by jinja2)\n* custom filters support", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/brodul/amplecode.recipe.template", "keywords": "zc.buildout recipe template Jinja2", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "brodul.recipe.template", "package_url": "https://pypi.org/project/brodul.recipe.template/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/brodul.recipe.template/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/brodul/amplecode.recipe.template" }, "release_url": "https://pypi.org/project/brodul.recipe.template/1.2.1/", "requires_dist": null, "requires_python": null, "summary": "Buildout recipe for making files out of Jinja2 templates", "version": "1.2.1" }, "last_serial": 787057, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "bb3f619f76cd12c73baf5052d90ff488", "sha256": "f7bc5a7f82fa98ebb9c2152845613494865318c9b6f0cd75417a5f8be22573f5" }, "downloads": -1, "filename": "brodul.recipe.template-1.2.tar.gz", "has_sig": false, "md5_digest": "bb3f619f76cd12c73baf5052d90ff488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6219, "upload_time": "2012-04-20T20:27:16", "url": "https://files.pythonhosted.org/packages/b7/db/743c30aaca5f0c0648e4bdd27394a49fbd91f744bccbe1ccdc25cedddaae/brodul.recipe.template-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "ae5c3b0dcbbf610b83f95b5d0dd48237", "sha256": "a02c02fc525ed61be1148d3cf73a39c529e9d255ddc5e9114ab0ba21414d6cad" }, "downloads": -1, "filename": "brodul.recipe.template-1.2.1.tar.gz", "has_sig": false, "md5_digest": "ae5c3b0dcbbf610b83f95b5d0dd48237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6818, "upload_time": "2012-10-30T23:27:36", "url": "https://files.pythonhosted.org/packages/0c/ff/ea35d7a18fdaf7991586feeee21e8cf93b5aa40edc0f4e70932447d54891/brodul.recipe.template-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae5c3b0dcbbf610b83f95b5d0dd48237", "sha256": "a02c02fc525ed61be1148d3cf73a39c529e9d255ddc5e9114ab0ba21414d6cad" }, "downloads": -1, "filename": "brodul.recipe.template-1.2.1.tar.gz", "has_sig": false, "md5_digest": "ae5c3b0dcbbf610b83f95b5d0dd48237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6818, "upload_time": "2012-10-30T23:27:36", "url": "https://files.pythonhosted.org/packages/0c/ff/ea35d7a18fdaf7991586feeee21e8cf93b5aa40edc0f4e70932447d54891/brodul.recipe.template-1.2.1.tar.gz" } ] }