{ "info": { "author": "gmdzy2010", "author_email": "gmdzy2010@126.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# \u6587\u672c\u6a21\u677f\u8f6cDOCX\u6587\u4ef6\n[![PyPI](https://img.shields.io/pypi/v/docx-parsing-gmdzy2010.svg)](https://pypi.org/project/docx-parsing-gmdzy2010/)\n\n### \u529f\u80fd\u6982\u8ff0\n_________\n\u672c\u5305\u57fa\u4e8e\u4e00\u5957\u81ea\u5b9a\u4e49\u7684`\u8f7b\u91cf\u7ea7\u6587\u672c\u6a21\u677f\u89e3\u6790\u7cfb\u7edf`\uff0c\u7528\u4e8e\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6210Word\u7684docx\u6587\u4ef6\n\n#### \u8f93\u5165\u6587\u4ef6\n###### 1. \u6587\u672c\u6a21\u677f\u6587\u4ef6\n\u6a21\u677f\u6587\u4ef6\u662f\u4e00\u4e2a\u7eaf\u6587\u672c\u6587\u4ef6\uff0c\u6bcf3\u884c\u4e3a\u4e00\u4e2a\u89e3\u6790\u5355\u4f4d\uff0c\u89e3\u6790\u89c4\u5219\u53ea\u6709\u4ee5\u4e0b3\u6761\uff1a\n>1.1 \u7b2c\u4e00\u884c\u5305\u62ec\u5143\u7d20\u7c7b\u578b\u548c\u6837\u5f0f\u540d\u79f0\uff0c\u7528\":\"\u9694\u5f00\uff1b \n\n>1.2 \u7b2c\u4e8c\u884c\u4e3a\u8981\u5199\u5165docx\u6587\u4ef6\u7684\u6587\u672c\uff0c\u6bcf\u884c\u5185\u90e8\u5206\u4e3a\u591a\u4e2arun\u5355\u4f4d\uff0c\u7528\"||\"\u9694\u5f00\uff0c\u6bcf\u4e2arun\u53ef\u4ee5\u6709\u4e0b\u5212\u7ebf\u548c\u52a0\u7c97\u4e24\u79cd\u6837\u5f0f\uff0c\u5728\u6bcf\u4e2arun\u7684\u5c3e\u90e8\uff0c\u7528\"::\"\u9694\u5f00 \n\n>1.3 \u7b2c\u4e09\u884c\u4e3a\u5206\u5272\u7ebf\uff0c79\u4e2a\u4e0b\u5212\u7ebf\uff0c\u4e3a\u4e86\u8ba9\u6a21\u677f\u66f4\u6613\u8bfb\u800c\u5df2\uff0c\u6ca1\u592a\u5927\u610f\u4e49 \n\n###### 2. DOCX\u6a21\u677f\u6587\u4ef6\n\u6587\u4ef6\u4e3a\u4e00\u4e2a\u7a7a\u7684\u6216\u8005\u81ea\u5b9a\u4e49\u7684docx\u6587\u4ef6\uff0c\u6700\u597d\u662f\u5305\u542bpython-docx\u81ea\u5e26docx\u6a21\u677f\u7684\u6240\u6709\u6837\u5f0f\uff0c\u65b9\u4fbf\u76f4\u63a5\u8c03\u7528\n\u6ce8\u610f\uff1a\u6837\u5f0f\u6709\u53ef\u80fd\u4e0d\u751f\u6548\uff0c\u89e3\u51b3\u65b9\u6cd5\u8bf7\u79fb\u6b65python-docx\u7684\u5b98\u65b9\u6587\u6863\n\n###### 3. \u6587\u672c\u6a21\u677f\u7684\u4e0a\u4e0b\u6587\u6570\u636e\n\u4e0a\u4e0b\u6587\u6570\u636e\u4e3a\u4e00\u4e2a\u5b57\u5178\u578b\u7684\u53d8\u91cf\uff0c\u7528\u6765\u5bf9\u6a21\u677f\u7684\u53d8\u91cf\u8fdb\u884c\u683c\u5f0f\u5316\u3002 \n\n3.1 \u6bb5\u843d\u4e0a\u4e0b\u6587\u5bf9\u8c61`PARAGRAPH_CONTEXT` \n\n\u4f8b\u5982\uff0c\u6587\u672c\u6a21\u677f\u4e2d\u6709\u4e00\u4e2a\u6bb5\u843d\u4e0a\u4e0b\u6587\u53d8\u91cf`test_context`\n```\n...\ncover:cover_title\n\u6a21\u677f\u5185\u5bb9||{test_context}::underline||\u540e\u7eed\u6587\u672c\n-------------------------------------------------------------------------------\n...\n```\n\u5219\u9700\u8981\u65b0\u5efa\u6bb5\u843d\u4e0a\u4e0b\u6587\u5bf9\u8c61\uff0c\u662f\u4e00\u4e2apython\u5b57\u5178\u5bf9\u8c61\uff0c\u53ef\u4ee5\u4ee5\u5b57\u5178\u952e\u503c\u5bf9\u7684\u5f62\u5f0f\u6dfb\u52a0\u591a\u4e2a \n\n```python\nPARAGRAPH_CONTEXT = {\n \"demo_field_1\": \"\u6d4b\u8bd5\u6587\u672c\",\n \"demo_field_2\": 300.00,\n \"demo_field_3\": 18003.00,\n}\n\n```\n3.2 \u8868\u683c\u4e0a\u4e0b\u6587\u5bf9\u8c61`TABLE_CONTEXT` \n\n\u4f8b\u5982\uff0c\u6587\u672c\u6a21\u677f\u4e2d\u6709\u4e00\u4e2a\u8868\u683c\n```\n...\ntable:demo_table_1\n\u8868\u683c\u4e0b\u9762\u7684\u6587\u672c\u4e0d\u91cd\u8981\uff0c\u4ec5\u4ec5\u7528\u4e8e\u5360\u4f4d\n-------------------------------------------------------------------------------\n...\n```\n\u8fd9\u65f6\u9700\u8981\u65b0\u5efa\u8868\u683c\u4e0a\u4e0b\u6587\u5bf9\u8c61\uff0c\u5305\u542b\u8868\u683c\u7684\u7ef4\u5ea6`rows`, `cols`\uff0c\u6837\u5f0f`style`\u7b49\uff0c\u7c7b\u4f3c\u4e8e\u4e0b\u65b9\uff0c\u53ef\u4ee5\u4ee5\u5b57\u5178\u952e\u503c\u5bf9\u7684\u5f62\u5f0f\u6dfb\u52a0\u591a\u4e2a\n```python\nTABLE_CONTEXT = {\n \"demo_table_1\": {\n \"attr\": {\n \"style\": \"Table Grid\",\n \"rows\": 5,\n \"cols\": 4,\n },\n \"data\": (\n (\"\u7b2c1\u5217\u6807\u9898\", \"\u7b2c2\u5217\u6807\u9898\", \"\u7b2c3\u5217\u6807\u9898\", \"\u7b2c4\u5217\u6807\u9898\"),\n (\"\u7b2c1\u884c\u7b2c1\u5217\u5185\u5bb9\", \"\u7b2c1\u884c\u7b2c2\u5217\u5185\u5bb9\", \"\u7b2c1\u884c\u7b2c3\u5217\u5185\u5bb9\", \"\u7b2c1\u884c\u7b2c4\u5217\u5185\u5bb9\"),\n (\"\u7b2c2\u884c\u7b2c1\u5217\u5185\u5bb9\", \"\u7b2c2\u884c\u7b2c2\u5217\u5185\u5bb9\", \"\u7b2c2\u884c\u7b2c3\u5217\u5185\u5bb9\", \"\u7b2c2\u884c\u7b2c4\u5217\u5185\u5bb9\"),\n (\"\u7b2c3\u884c\u7b2c1\u5217\u5185\u5bb9\", \"\u7b2c3\u884c\u7b2c2\u5217\u5185\u5bb9\", \"\u7b2c3\u884c\u7b2c3\u5217\u5185\u5bb9\", \"\u7b2c3\u884c\u7b2c4\u5217\u5185\u5bb9\"),\n (\"\u7b2c4\u884c\u7b2c1\u5217\u5185\u5bb9\", \"\u7b2c4\u884c\u7b2c2\u5217\u5185\u5bb9\", \"\u7b2c4\u884c\u7b2c3\u5217\u5185\u5bb9\", \"\u7b2c4\u884c\u7b2c4\u5217\u5185\u5bb9\"),\n )\n },\n},\n```\n3.3 \u56fe\u7247\u4e0a\u4e0b\u6587\u5bf9\u8c61`PICTURE_CONTEXT` \n\n\u4ecd\u5728\u6d4b\u8bd5\u4e2d\uff0c\u540e\u7eed\u5355\u5143\u6d4b\u8bd5\u901a\u8fc7\u540e\u4f1a\u5c06\u6587\u6863\u66f4\u65b0\n\n### \u4f7f\u7528\n_________\n>STEP 1. \u5728\u9879\u76ee\u4e2d\u5bfc\u5165\u6e32\u67d3\u5668`DocxProduce`\uff0c\n\n>STEP 2. \u5199\u597d\u6587\u672c\u6a21\u677f\uff0c\u9009\u62e9\u4e00\u4e2a\u81ea\u5e26\u6837\u5f0f\u6bd4\u8f83\u9f50\u5168\u7684DOCX\u6587\u4ef6\uff0c\u53ef\u4ee5\u4ecepython-docx\u9ed8\u8ba4\u7684\u6a21\u677f\u62f7\u8d1d\u800c\u6765 \n\n>STEP 3. \u52a0\u8f7d\u51c6\u5907\u597d\u7684\u4e0a\u4e0b\u6587\u548c\u683c\u5f0f\u53ca\u6837\u5f0f\u6570\u636e\uff0c\u6267\u884c\u7a0b\u5e8f\u5373\u5b8c\u6210\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/gmdzy2010/docx_parsing_gmdzy2010", "keywords": "docx;text;template", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "docx-parsing-gmdzy2010", "package_url": "https://pypi.org/project/docx-parsing-gmdzy2010/", "platform": "", "project_url": "https://pypi.org/project/docx-parsing-gmdzy2010/", "project_urls": { "Homepage": "https://github.com/gmdzy2010/docx_parsing_gmdzy2010" }, "release_url": "https://pypi.org/project/docx-parsing-gmdzy2010/1.3.1/", "requires_dist": null, "requires_python": "", "summary": "\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u672c\u6a21\u677f\u8f6cDOCX\u6587\u4ef6\u7684\u5305", "version": "1.3.1" }, "last_serial": 4818579, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "f8cba44bfe29754090e2e110516931a2", "sha256": "f9ab5ad009f45f050a15e0be7588a371736a959c826f43f9705c3d9724654400" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f8cba44bfe29754090e2e110516931a2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9095, "upload_time": "2019-01-23T09:43:09", "url": "https://files.pythonhosted.org/packages/0b/c0/86c4c8a1b31730f88cad22c83361ea8df4adaefc4d85af03e9853adaa984/docx_parsing_gmdzy2010-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8477d42bffa1bbf785117aa4ffbcb127", "sha256": "03fd9000eb94bc6bcf46a047aeec3a2cb57fca88cf5c34c9eda7e358447f1039" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8477d42bffa1bbf785117aa4ffbcb127", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6146, "upload_time": "2019-01-23T09:43:10", "url": "https://files.pythonhosted.org/packages/54/54/9716ff0dd0509175aa147bd47b207a28a65d59b0197b18f1e7ad8b322d0d/docx_parsing_gmdzy2010-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "7f7eaba00f6c3593e540545b88d58bcb", "sha256": "19a0928d11702a5e6b9a7a444319b3f05f5caba2fd4ce8f9f70b80a09f58c09a" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7f7eaba00f6c3593e540545b88d58bcb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8788, "upload_time": "2019-01-24T03:45:36", "url": "https://files.pythonhosted.org/packages/b8/e9/5fe660f3f864e5b8e2c37d4eb85caa843cbd2f7f76dba6a7b286f52169da/docx_parsing_gmdzy2010-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b998e2672d81fa75ecf0025959e0837c", "sha256": "24a8f5c3cfedeea926a26d11724f5090af0081931e63d9a7e707aeab3d6a0330" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b998e2672d81fa75ecf0025959e0837c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5872, "upload_time": "2019-01-24T03:45:38", "url": "https://files.pythonhosted.org/packages/c1/41/0978c8b21b8a5906b3984bf6e96d35ddc8775c3ee694163e17bbddc6ac93/docx_parsing_gmdzy2010-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "6fe6385e589d8a6c16302e598317f314", "sha256": "2785a7b1073ef3637448cdac8504699b9d1766e2e1f43208f00d62dc0bd33cf6" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6fe6385e589d8a6c16302e598317f314", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10144, "upload_time": "2019-01-28T02:01:39", "url": "https://files.pythonhosted.org/packages/c8/90/e82526904b91910f84d5ac259ea74462867a9426a0b535a4d295b7ef514d/docx_parsing_gmdzy2010-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4312b70110e67fb08ad546cd4601e0a0", "sha256": "2ae403e56b9422359c2a31ddafb2ad7260c05523b0307578ce96ebb5df273f0f" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.0.tar.gz", "has_sig": false, "md5_digest": "4312b70110e67fb08ad546cd4601e0a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6708, "upload_time": "2019-01-28T02:01:41", "url": "https://files.pythonhosted.org/packages/82/21/bcdf9067e9f9f248cb8cb84be01eab4f3dd24ae62daa8bd2a8c9547196d8/docx_parsing_gmdzy2010-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "ea595b506ef63d5b35de96d3caab1a1e", "sha256": "59f4df3bea8b8b024fcb0186da4bd1fbe0b1f1900bc2eebde55cd2274f1d4609" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ea595b506ef63d5b35de96d3caab1a1e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10748, "upload_time": "2019-01-28T02:57:31", "url": "https://files.pythonhosted.org/packages/d9/2d/efdd8bac764ef4de38bb4bfd7b5b97183059cac4dbe028f56a429f242631/docx_parsing_gmdzy2010-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9454b3c4c49a191c379e1ba270379cea", "sha256": "a5965b8bd8b70272a16ce2ab14d8123cd8b17412186cbde2ac18c51e23facdac" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.1.tar.gz", "has_sig": false, "md5_digest": "9454b3c4c49a191c379e1ba270379cea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7198, "upload_time": "2019-01-28T02:57:33", "url": "https://files.pythonhosted.org/packages/a0/cb/d82aabffd4f392929f7fc86494eac689df6ec004a39a9b6a07edc5cd508b/docx_parsing_gmdzy2010-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "ca4216ec82efca563ba07b1a7d4b84c7", "sha256": "93c11cd50c32711f3ac397a01244073206c57e110dee1a40a3eee9b03af0ad68" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ca4216ec82efca563ba07b1a7d4b84c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10745, "upload_time": "2019-01-30T15:02:39", "url": "https://files.pythonhosted.org/packages/42/5c/3df1e2ee8770c3078c7908a91aaca49eb7350e9b7a317fd498ac22c0a7fe/docx_parsing_gmdzy2010-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2996f8ea3e1704febba7d004fdf35b6d", "sha256": "8db87a319a740adf8b45c8ac44e7fbd60013c0578aa380ce4f8d798674aeabe5" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.2.2.tar.gz", "has_sig": false, "md5_digest": "2996f8ea3e1704febba7d004fdf35b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7203, "upload_time": "2019-01-30T15:02:41", "url": "https://files.pythonhosted.org/packages/c0/85/c7eeb829c60d8118b562868318123c9e3110f24a95975a740127b5cde97b/docx_parsing_gmdzy2010-1.2.2.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "5ed9fe39921423acebb9e98af0b582e0", "sha256": "ca8b25067377c28f8c037f4eee1978b26a8671925d722cc2e0ed6d5915a9a358" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5ed9fe39921423acebb9e98af0b582e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10843, "upload_time": "2019-01-30T15:41:05", "url": "https://files.pythonhosted.org/packages/cf/8b/e8d988e2f8a9ba59c8429ba16948f6cbd9ee9f44ac2119014eeda9770e69/docx_parsing_gmdzy2010-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9930296426357350f38bd9f7584838c9", "sha256": "c5440ae2d6383a226e4bc11742b3415f329c0483ad805f002ab86ccc57dd8498" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.0.tar.gz", "has_sig": false, "md5_digest": "9930296426357350f38bd9f7584838c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7269, "upload_time": "2019-01-30T15:41:06", "url": "https://files.pythonhosted.org/packages/f8/65/20036e2e8f3c005674d52ed6f9c9c95285981411e9d0a9b01aeaef32fdbd/docx_parsing_gmdzy2010-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "31643ba72121eb12433e03ddbfbc4640", "sha256": "dd9d6e97aac90817cb29884fdcbec2612163656d541c51e829a2691640241f68" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "31643ba72121eb12433e03ddbfbc4640", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10940, "upload_time": "2019-01-30T16:39:39", "url": "https://files.pythonhosted.org/packages/e7/0d/7141a9e3a7a80dec61a5873afd49784f17ea02de9af25644fba154bb7c2f/docx_parsing_gmdzy2010-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "231001048fa246595ed0949ccad584e6", "sha256": "a3dc83dc335d5576493865d98676d3032d5ad4e7585eb55d2ff13fc0f7600c44" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.1.tar.gz", "has_sig": false, "md5_digest": "231001048fa246595ed0949ccad584e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7376, "upload_time": "2019-01-30T16:39:41", "url": "https://files.pythonhosted.org/packages/c0/2c/6702bc208f50c25085951ebb9e04868478a3e111a61ce298c7c83524bb8c/docx_parsing_gmdzy2010-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "31643ba72121eb12433e03ddbfbc4640", "sha256": "dd9d6e97aac90817cb29884fdcbec2612163656d541c51e829a2691640241f68" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "31643ba72121eb12433e03ddbfbc4640", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10940, "upload_time": "2019-01-30T16:39:39", "url": "https://files.pythonhosted.org/packages/e7/0d/7141a9e3a7a80dec61a5873afd49784f17ea02de9af25644fba154bb7c2f/docx_parsing_gmdzy2010-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "231001048fa246595ed0949ccad584e6", "sha256": "a3dc83dc335d5576493865d98676d3032d5ad4e7585eb55d2ff13fc0f7600c44" }, "downloads": -1, "filename": "docx_parsing_gmdzy2010-1.3.1.tar.gz", "has_sig": false, "md5_digest": "231001048fa246595ed0949ccad584e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7376, "upload_time": "2019-01-30T16:39:41", "url": "https://files.pythonhosted.org/packages/c0/2c/6702bc208f50c25085951ebb9e04868478a3e111a61ce298c7c83524bb8c/docx_parsing_gmdzy2010-1.3.1.tar.gz" } ] }