{ "info": { "author": "Jon Wedaman", "author_email": "jweede@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "======================\njweede.recipe.template\n======================\n\njweede.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/jweede.recipe.template/\n\n.. image:: https://travis-ci.org/jweede/amplecode.recipe.template.svg\n :target: https://travis-ci.org/jweede/amplecode.recipe.template\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\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\n* templates should not have the ability to change state of buildout", "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/jweede/amplecode.recipe.template", "keywords": "zc.buildout recipe template Jinja2", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "jweede.recipe.template", "package_url": "https://pypi.org/project/jweede.recipe.template/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jweede.recipe.template/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/jweede/amplecode.recipe.template" }, "release_url": "https://pypi.org/project/jweede.recipe.template/1.2.4/", "requires_dist": null, "requires_python": null, "summary": "Buildout recipe for making files out of Jinja2 templates", "version": "1.2.4" }, "last_serial": 1386082, "releases": { "1.2.2": [ { "comment_text": "", "digests": { "md5": "92510939c6913d1f1726113833dfe6c1", "sha256": "935e33502c69d9b9cdfedebc96bd7a3fde684ea8c64635e7eac5a90e859a0379" }, "downloads": -1, "filename": "jweede.recipe.template-1.2.2.tar.gz", "has_sig": false, "md5_digest": "92510939c6913d1f1726113833dfe6c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6819, "upload_time": "2014-11-26T20:45:56", "url": "https://files.pythonhosted.org/packages/5f/77/f30b4e956c15b65dd60c07f7a0e2a074af98766157d78fcdd03e029edd2f/jweede.recipe.template-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "42fbbb84dcd29d55926a4906e793a698", "sha256": "125bac1a027739d9f712e39f970f0835d6fbb7136ea7f4ae5951cf40353bf6fd" }, "downloads": -1, "filename": "jweede.recipe.template-1.2.3.tar.gz", "has_sig": false, "md5_digest": "42fbbb84dcd29d55926a4906e793a698", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6872, "upload_time": "2015-01-17T18:58:39", "url": "https://files.pythonhosted.org/packages/7b/7b/2435e722614c66522403191cb23deae1767d01097e2cac32117d6222646d/jweede.recipe.template-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "e85624e9c11e7acdd85999eee2ed54cb", "sha256": "931ccec55844ab96fa34ae67089f64c6ed7d738f0620f7c3159a56cb613812c5" }, "downloads": -1, "filename": "jweede.recipe.template-1.2.4.tar.gz", "has_sig": false, "md5_digest": "e85624e9c11e7acdd85999eee2ed54cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6897, "upload_time": "2015-01-17T19:09:33", "url": "https://files.pythonhosted.org/packages/a3/09/ddd309a49faec2d3f2bc7615bbb9b929d8b0044207816ced5fb75c1f0c47/jweede.recipe.template-1.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e85624e9c11e7acdd85999eee2ed54cb", "sha256": "931ccec55844ab96fa34ae67089f64c6ed7d738f0620f7c3159a56cb613812c5" }, "downloads": -1, "filename": "jweede.recipe.template-1.2.4.tar.gz", "has_sig": false, "md5_digest": "e85624e9c11e7acdd85999eee2ed54cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6897, "upload_time": "2015-01-17T19:09:33", "url": "https://files.pythonhosted.org/packages/a3/09/ddd309a49faec2d3f2bc7615bbb9b929d8b0044207816ced5fb75c1f0c47/jweede.recipe.template-1.2.4.tar.gz" } ] }