{ "info": { "author": "Derrick Staples", "author_email": "broiledmeat@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup" ], "description": "# Jinja2 Support for Pydgeot\nAdd support for [Jinja2](https://github.com/mitsuhiko/jinja2) templates to\n[Pydgeot](http://www.github.com/broiledmeat/pydgeot). Any changes to extended or included templates will propagate\nregeneration to the file that used those templates. Templates may set context variables that are accessible from\nother templates, which will also affect the regeneration.\n\n### Features\n- Standard [Jinja2](https://github.com/mitsuhiko/jinja2) templating.\n- Globally available context variables.\n- Regenerate files dependent on other templates or context variables.\n\n### Requirements\n- Python 3.*\n- [Pydgeot](http://www.github.com/broiledmeat/pydgeot)\n- [Jinja2](https://github.com/mitsuhiko/jinja2)\n\n### Installation\nVia pip:\n```bash\npip install pydgeot_jinja\n```\n\nOr via source:\n```bash\ngit clone https://github.com/broiledmeat/pydgeot_jinja.git pydgeot_jinja\ncd pydgeot_jinja\npython setup.py install\n```\n\n### Configuration\nAdd `jinja` to your pydgeot.conf `plugins` list to enable the plugin. Then add `jinja` to the `processors` list in\npydgeot.conf, or nested .pydgeot.conf's, to use the file processor. Options are, also, placed under a `jinja` key.\n- `source_ext` Extension of source files to build. _Default: .html_\n- `build_ext` Extension of built files. _Default: .html_\n```json\n{\n \"plugins\": [\"jinja\"],\n \"processors\": [\"jinja\"],\n \"jinja\" {\n \"source_ext\": \".jinja\"\n }\n}\n```\n\n### Usage\nThe Jinja2 plugin will process any `.html` (or `source_ext` extension specified in pydgeot.conf) file as a Jinja2\ntemplate.\n\nA page may be marked as template only by setting the `template_only` variable to `True`. This will cause the file to not\nbe generated, but any changes will still cause dependent files to be generated.\n\n#### Context Variables\nSetting a context variable makes it available to the file it was created in, and to any other template file.\n`{% setcontext name=\"value\" }%`\n\nContext variables can be accessed in the setting file (or extended and included files,) in the same way as if it had\nbeen created with the standard Jinja `set`.\n\nContext variables may be created with the same names across multiple sources, so global access is done iteratively.\n`getcontexts(name, \"value\")` will retrieve a list of files that have set a context variable matching the name and value.\nThe value may be a [glob pattern](https://github.com/broiledmeat/pydgeot#glob-patterns).\n\nFor example, `{% for page in getcontexts(\"fullname\", \"test.*\") %}` would find any file with context variables named\n\"fullname\" with values starting with \"test.\", then grab all of that files context variables and set them as properties\nof `page`.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/broiledmeat/pydgeot_jinja", "keywords": null, "license": "Apache License, Version 2.0", "maintainer": null, "maintainer_email": null, "name": "pydgeot_jinja", "package_url": "https://pypi.org/project/pydgeot_jinja/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pydgeot_jinja/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/broiledmeat/pydgeot_jinja" }, "release_url": "https://pypi.org/project/pydgeot_jinja/0.5/", "requires_dist": null, "requires_python": null, "summary": "Jinja2 support for Pydgeot.", "version": "0.5" }, "last_serial": 2367785, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "22a6a9d46fdf8469c2bd0830a24a7c0d", "sha256": "b47d7e2436d1f4aacbcffc699d487d850d90f361e923ab6d07d101502fce8e18" }, "downloads": -1, "filename": "pydgeot_jinja-0.5.tar.gz", "has_sig": false, "md5_digest": "22a6a9d46fdf8469c2bd0830a24a7c0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4633, "upload_time": "2016-09-28T03:44:33", "url": "https://files.pythonhosted.org/packages/1e/03/fbeea95c47c387c18d3bd852e45675b3cb01f79a1c3530e217c1cde1afae/pydgeot_jinja-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "22a6a9d46fdf8469c2bd0830a24a7c0d", "sha256": "b47d7e2436d1f4aacbcffc699d487d850d90f361e923ab6d07d101502fce8e18" }, "downloads": -1, "filename": "pydgeot_jinja-0.5.tar.gz", "has_sig": false, "md5_digest": "22a6a9d46fdf8469c2bd0830a24a7c0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4633, "upload_time": "2016-09-28T03:44:33", "url": "https://files.pythonhosted.org/packages/1e/03/fbeea95c47c387c18d3bd852e45675b3cb01f79a1c3530e217c1cde1afae/pydgeot_jinja-0.5.tar.gz" } ] }