{ "info": { "author": "Bjarni R. Einarsson", "author_email": "bre@klaki.net", "bugtrack_url": null, "classifiers": [], "description": "===============\n odt_templater\n===============\n---------------------------------------------\n a simple Open Document Text templating tool\n---------------------------------------------\n\nThis is a minimal module for creating ODT files based on ODT templates and\ndictionaries of values.\n \nNote that the template rendering is based on regular expression matches on\nthe ODT internal XML data; as such it should not be considered robust and\nwill most certainly fail on some inputs. However, it's \"good enough\" to be\nvery useful considering the tiny code footprint - there are more lines of\ndocumentation than code here!\n \nJust be sure to test your templates...\n \nExample:::\n \n from odt_template import render_odt_template\n\n # Assuming a template that has:\n # - A @TO@ marker somewhere on the page\n # - A table with a row containing @CHILD@ and @NAUGHTY@ markers\n # - An embedded image named XMAS.png\n #\n render_odt_template('xmas-template.odt', 'simpsons-family.odt', {\n 'to': 'Santa Claus',\n 'child': [\n {'child': 'Bart', 'naughty': 'yes'},\n {'child': 'Lisa', 'naughty': 'no'},\n {'child': 'Maggie', 'naughty': 'no'}\n ],\n 'Pictures/XMAS.png': open('pretty-tree.png', 'r').read()\n })\n\n\nWhy doesn't my template work?\n=============================\n\nLibreOffice has probably injected random formatting markup in the middle of\nyour placeholders, preventing the tool from recognizing them. Using \"Format,\nClear Direct Formatting\" and then reformatting again (taking care to always\nselect entire placeholders) usually helps.\n\n\nContributions and bug reports\n=============================\n\nPlease file pull requests or open issues on this project's Github repository:\nhttps://github.com/BjarniRunar/odt-templater/\n\n\nCopyright and License (MIT)\n===========================\n\nThis code is (C) Copyright 2017, Bjarni R\u00fanar Einarsson.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "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/BjarniRunar/odt_templater", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "odt_templater", "package_url": "https://pypi.org/project/odt_templater/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/odt_templater/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/BjarniRunar/odt_templater" }, "release_url": "https://pypi.org/project/odt_templater/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Simple Open Document Text templating tool", "version": "0.1.2" }, "last_serial": 2750890, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "9e73377bb75d7b0a442c96f6ca198bc9", "sha256": "eb48773653e48781ca9547f26afbd57a73c75698d61d45394741a1815ac72976" }, "downloads": -1, "filename": "odt_templater-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9e73377bb75d7b0a442c96f6ca198bc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3474, "upload_time": "2017-04-01T14:00:15", "url": "https://files.pythonhosted.org/packages/37/e2/b5bcb18d2468e72e09b9f891122b467bd92092011a6463b992812652ba10/odt_templater-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b20c477a6bdef98a53165c2b67e14634", "sha256": "c161e13b2c8ecbceb44cad0c5eba9a28819cc7ddcf1773df36b729b2f95975d6" }, "downloads": -1, "filename": "odt_templater-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b20c477a6bdef98a53165c2b67e14634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3861, "upload_time": "2017-04-03T23:38:34", "url": "https://files.pythonhosted.org/packages/63/2a/0ded7a5e9cedf7e078cca6dbf630a2008aa31a45c031f411a08dc526948b/odt_templater-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b20c477a6bdef98a53165c2b67e14634", "sha256": "c161e13b2c8ecbceb44cad0c5eba9a28819cc7ddcf1773df36b729b2f95975d6" }, "downloads": -1, "filename": "odt_templater-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b20c477a6bdef98a53165c2b67e14634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3861, "upload_time": "2017-04-03T23:38:34", "url": "https://files.pythonhosted.org/packages/63/2a/0ded7a5e9cedf7e078cca6dbf630a2008aa31a45c031f411a08dc526948b/odt_templater-0.1.2.tar.gz" } ] }