{ "info": { "author": "liying", "author_email": "liruoer2008@yeah.net", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "=====================\ndocument-template\n=====================\n\nPython\u89e3\u6790\u6587\u6863\u6a21\u7248\n=====================\n\n.. image:: https://img.shields.io/pypi/v/document-template.svg\n :target: https://pypi.org/project/document-template/\n.. image:: https://img.shields.io/pypi/pyversions/document-template.svg\n :target: https://pypi.org/project/document-template/\n.. image:: https://img.shields.io/pypi/l/document-template.svg\n :target: https://github.com/liying2008/document-template\n.. image:: https://img.shields.io/pypi/wheel/document-template.svg\n :target: https://pypi.org/project/document-template/#files\n\n\n\u5b89\u88c5\u65b9\u6cd5\n---------\n\u4f7f\u7528 **pip** \u5b89\u88c5\uff1a\n::\n\n pip install document-template\n\n\u4f7f\u7528\u65b9\u6cd5\n---------\n\u53c2\u8003 test.py_ \u548c test.html_ :\n\n.. _test.py: https://github.com/liying2008/document-template/blob/master/test.py\n.. _test.html: https://github.com/liying2008/document-template/blob/master/test.html\n\n:test.html:\n\n.. code-block:: html\n\n \n \n \n \n \n #{title}\n \n \n

#{head}

\n #{url}\n
\n Test.......\n
\n #{large_font}\n
\n \u4e3a\u771f\u65f6\u663e\u793a:#{bool:show_span}\u663e\u793a\u7684\u5185\u5bb9#{bool:show_span};;\u5206\u5272;;#{bool:show_span}show_span is True#{bool:show_span}\n
\n #{copy:start}\u591a\u884c\u6587\u5b57\uff0c\u66ff\u6362\u5c40\u90e8\u5185\u5bb9\uff1a#{contents} \u548c #{another_contents}#{copy:end}\n \n \n\n:test.py:\n\n.. code-block:: python\n\n from document_template import DocumentTemplate\n\n if __name__ == '__main__':\n id_dict = {\"title\": \"\u6807\u9898\", \"head\": \"\u6b63\u6587\u6807\u9898\", \"url\": \"https://github.com/liying2008\", \"large_font\": \"\u5927\u53f7\u5b57\u4f53\"}\n id_dict['show_span'] = True\n\n # Multi-line copy supports string, list and tuple\n # id_dict['contents'] = 'ABCDEFG'\n # id_dict['another_contents'] = '1234567'\n id_dict['contents'] = ('A', 'B', 'C', 'D', 'E', 'F', 'G')\n id_dict['another_contents'] = ['1', '2', '3', '4', '5', '6', '7']\n temp = DocumentTemplate()\n temp.load(\"test.html\", encoding='utf-8')\n temp.set_identifier_dict(id_dict)\n temp.linefeed = '
\\n'\n temp.save_document(\"new_test.html\")\n\n\n\u6ce8\u610f\u4e8b\u9879\n---------\n- \u6210\u5bf9\u51fa\u73b0\u7684 **#{bool:}** \u987b\u5728\u540c\u4e00\u884c\uff1b\n- \u6210\u5bf9\u51fa\u73b0\u7684 **#{copy:}** \u987b\u5728\u540c\u4e00\u884c\uff1b\n- \u4e0d\u652f\u6301 **#{bool:}**\u3001 **#{copy:}** \u5d4c\u5957\u4f7f\u7528\u3002\n\n\n\u66f4\u65b0\u5185\u5bb9\n---------\n- \u652f\u6301 Python 3\uff1b\n- \u652f\u6301\u591a\u884c\u62f7\u8d1d\u4e2d\u6709\u591a\u4e2a ``#{\u6807\u8bc6\u7b26}``\uff1b\n- \u652f\u6301\u81ea\u5b9a\u4e49\u591a\u884c\u62f7\u8d1d\u7684\u6362\u884c\u7b26\u3002\n\n\nLICENSE\n---------\n`MIT License `_\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/liying2008/document-template", "keywords": "template document", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "document-template", "package_url": "https://pypi.org/project/document-template/", "platform": "", "project_url": "https://pypi.org/project/document-template/", "project_urls": { "Homepage": "https://github.com/liying2008/document-template" }, "release_url": "https://pypi.org/project/document-template/0.0.6/", "requires_dist": [ "setuptools" ], "requires_python": "", "summary": "Generate documents according to the template.", "version": "0.0.6" }, "last_serial": 4182699, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9229284c5d6240589ca8459144516fa3", "sha256": "7dd11e26c58683479735835b7d3a5fbeb24471f68ea8f9cdd4b6ec02a101fa45" }, "downloads": -1, "filename": "document_template-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "9229284c5d6240589ca8459144516fa3", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4754, "upload_time": "2018-04-07T13:53:13", "url": "https://files.pythonhosted.org/packages/58/91/769abcf2dfd5788e3886b276206ce6f28fd4e5cbbf270df2d5525ee974f9/document_template-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "f0fdc70d8002a5441217dddf3d1a1790", "sha256": "81d54c93d4cb1a4d29db2feb52a73ca480a7e0a27122b899e56c1a4c5bb9c702" }, "downloads": -1, "filename": "document-template-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f0fdc70d8002a5441217dddf3d1a1790", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2585, "upload_time": "2018-04-07T13:53:12", "url": "https://files.pythonhosted.org/packages/e5/48/ca06aaa3872cd9dd5eb804d62cd0723496c24cb7d882efa0c830487e4e58/document-template-0.0.1.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f72191d9200233f2777eb9c238ccca9b", "sha256": "6ddda6cf077beaad1d80ecf7ac28d1b658aa7aa0c86ceb31930592dfa38d5a1d" }, "downloads": -1, "filename": "document-template-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f72191d9200233f2777eb9c238ccca9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3276, "upload_time": "2018-04-08T13:19:45", "url": "https://files.pythonhosted.org/packages/f4/11/12885faabf6c41db51481f2b6ff145d597c97f5eec39271a309aaaa1ca60/document-template-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "66bef89290067d25ced2eead8dc5a686", "sha256": "7b174fe0af2000a942ec3d64e0c91b3efa6101d97fcaef15acdfc7d478333181" }, "downloads": -1, "filename": "document_template-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "66bef89290067d25ced2eead8dc5a686", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3978, "upload_time": "2018-08-18T05:28:50", "url": "https://files.pythonhosted.org/packages/2e/07/2b8cd48ab53315972cd1cfa876f0d188edfdaac81cdb3d5bd52ac64c4367/document_template-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "56f5e12104f7916506e33847f365f5d7", "sha256": "c75be46382cc021ae863dbac998ef1f4f627869278d97157961de7b0f6e2bc19" }, "downloads": -1, "filename": "document-template-0.0.4.tar.gz", "has_sig": false, "md5_digest": "56f5e12104f7916506e33847f365f5d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4553, "upload_time": "2018-08-18T05:28:52", "url": "https://files.pythonhosted.org/packages/29/ef/0f1410e899a787578ae15a5caae6da9c15a6a9a68d03412c2b3117e8af54/document-template-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "7b4b9f142d86f446e4aa559aa82c6b94", "sha256": "a0eb3b9270033623f2715cced92882f96961fbb9c195f1c6889474d635e6b6e4" }, "downloads": -1, "filename": "document_template-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b4b9f142d86f446e4aa559aa82c6b94", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4226, "upload_time": "2018-08-18T07:11:14", "url": "https://files.pythonhosted.org/packages/c3/a9/8cdc6771452dde6345c975552d4606e34e0fd948688d920003d8324dfb99/document_template-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20663f8a0fb4503fd964b169cc5cce1f", "sha256": "2fb149c04307ef0c260bfe13496110110b6c9a3908197a6f7fb4a6729add325e" }, "downloads": -1, "filename": "document-template-0.0.5.tar.gz", "has_sig": false, "md5_digest": "20663f8a0fb4503fd964b169cc5cce1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4734, "upload_time": "2018-08-18T07:11:15", "url": "https://files.pythonhosted.org/packages/38/76/1e4a413f3a1e00b8d833e6a6964cd6cb5ea9ee830afaeb2ebfe0b445c624/document-template-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "0712c9383742b4714e78f4a81e657811", "sha256": "e8356db0db439813951239dc7ded987463378a1e426f4609f5e9ac45f99e1bc3" }, "downloads": -1, "filename": "document_template-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0712c9383742b4714e78f4a81e657811", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4393, "upload_time": "2018-08-18T09:42:52", "url": "https://files.pythonhosted.org/packages/b5/01/0038c481e0f66b86841b56ec3dde1af30b8695c0fb50066806de3594a33e/document_template-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1d6695ee5f278425ca164d639ff7050", "sha256": "4b541a4680be9a075eb5edab085b7ed05f21623c21e81a61e2e6fd524f6143f3" }, "downloads": -1, "filename": "document-template-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e1d6695ee5f278425ca164d639ff7050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4913, "upload_time": "2018-08-18T09:42:54", "url": "https://files.pythonhosted.org/packages/fe/cc/9847cfbc82f010242032abe70ad1e87d153090b010e0d9d4629037377e3d/document-template-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0712c9383742b4714e78f4a81e657811", "sha256": "e8356db0db439813951239dc7ded987463378a1e426f4609f5e9ac45f99e1bc3" }, "downloads": -1, "filename": "document_template-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0712c9383742b4714e78f4a81e657811", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4393, "upload_time": "2018-08-18T09:42:52", "url": "https://files.pythonhosted.org/packages/b5/01/0038c481e0f66b86841b56ec3dde1af30b8695c0fb50066806de3594a33e/document_template-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1d6695ee5f278425ca164d639ff7050", "sha256": "4b541a4680be9a075eb5edab085b7ed05f21623c21e81a61e2e6fd524f6143f3" }, "downloads": -1, "filename": "document-template-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e1d6695ee5f278425ca164d639ff7050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4913, "upload_time": "2018-08-18T09:42:54", "url": "https://files.pythonhosted.org/packages/fe/cc/9847cfbc82f010242032abe70ad1e87d153090b010e0d9d4629037377e3d/document-template-0.0.6.tar.gz" } ] }