{ "info": { "author": "Devin", "author_email": "1324556701@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# XMind\n\n![mind_mapping](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/xmind.png)\n\n**[XMind](https://github.com/zhuifengshen/xmind)** \u662f\u57fa\u4e8e Python \u5b9e\u73b0\uff0c\u63d0\u4f9b\u4e86\u5bf9 [XMind\u601d\u7ef4\u5bfc\u56fe](https://www.xmind.cn/)\u8fdb\u884c\u521b\u5efa\u3001\u89e3\u6790\u3001\u66f4\u65b0\u7684\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848\uff01\n\n\n### \u4e00\u3001\u5b89\u88c5\u65b9\u5f0f\n```\npip3 install XMind \n\nor\n\npip3 install xmind\n```\n\n\n### \u4e8c\u3001\u7248\u672c\u5347\u7ea7\n```\npip3 install -U XMind\n```\n\n\n### \u4e09\u3001\u4f7f\u7528\u65b9\u5f0f\n\n#### 1\u3001\u521b\u5efaXMind\u6587\u4ef6\n```\ndef gen_my_xmind_file(): \n # 1\u3001\u5982\u679c\u6307\u5b9a\u7684XMind\u6587\u4ef6\u5b58\u5728\uff0c\u5219\u52a0\u8f7d\uff0c\u5426\u5219\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\n workbook = xmind.load(\"my.xmind\")\n\n # 2\u3001\u83b7\u53d6\u7b2c\u4e00\u4e2a\u753b\u5e03\uff08Sheet\uff09\uff0c\u9ed8\u8ba4\u65b0\u5efa\u4e00\u4e2aXMind\u6587\u4ef6\u65f6\uff0c\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u7684\u753b\u5e03\n sheet1 = workbook.getPrimarySheet()\n # \u5bf9\u7b2c\u4e00\u4e2a\u753b\u5e03\u8fdb\u884c\u8bbe\u8ba1\u5b8c\u5584\uff0c\u5177\u4f53\u53c2\u7167\u4e0b\u4e00\u4e2a\u51fd\u6570\n design_sheet1(sheet1)\n\n # 3\u3001\u521b\u5efa\u7b2c\u4e8c\u4e2a\u753b\u5e03\n gen_sheet2(workbook, sheet1)\n\n # 4\u3001\u4fdd\u5b58\uff08\u5982\u679c\u6307\u5b9apath\u53c2\u6570\uff0c\u53e6\u5b58\u4e3a\u8be5\u6587\u4ef6\u540d\uff09\n xmind.save(workbook, path='test.xmind')\n```\n\n![first sheet](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/first_sheet.png)\n\n```\ndef design_sheet1(sheet1):\n # ***** \u7b2c\u4e00\u4e2a\u753b\u5e03 *****\n sheet1.setTitle(\"first sheet\") # \u8bbe\u7f6e\u753b\u5e03\u540d\u79f0\n\n # \u83b7\u53d6\u753b\u5e03\u7684\u4e2d\u5fc3\u4e3b\u9898\uff0c\u9ed8\u8ba4\u521b\u5efa\u753b\u5e03\u65f6\u4f1a\u65b0\u5efa\u4e00\u4e2a\u7a7a\u767d\u4e2d\u5fc3\u4e3b\u9898\n root_topic1 = sheet1.getRootTopic()\n root_topic1.setTitle(\"root node\") # \u8bbe\u7f6e\u4e3b\u9898\u540d\u79f0\n\n # \u521b\u5efa\u4e00\u4e2a\u5b50\u4e3b\u9898\uff0c\u5e76\u8bbe\u7f6e\u5176\u540d\u79f0\n sub_topic1 = root_topic1.addSubTopic()\n sub_topic1.setTitle(\"first sub topic\")\n\n sub_topic2 = root_topic1.addSubTopic()\n sub_topic2.setTitle(\"second sub topic\")\n\n sub_topic3 = root_topic1.addSubTopic()\n sub_topic3.setTitle(\"third sub topic\")\n\n sub_topic4 = root_topic1.addSubTopic()\n sub_topic4.setTitle(\"fourth sub topic\")\n\n # \u9664\u4e86\u65b0\u5efa\u5b50\u4e3b\u9898\uff0c\u8fd8\u53ef\u4ee5\u521b\u5efa\u81ea\u7531\u4e3b\u9898(\u6ce8\u610f:\u53ea\u6709\u4e2d\u5fc3\u4e3b\u9898\u652f\u6301\u521b\u5efa\u81ea\u7531\u4e3b\u9898)\n detached_topic1 = root_topic1.addSubTopic(topics_type=TOPIC_DETACHED)\n detached_topic1.setTitle(\"detached topic\")\n detached_topic1.setPosition(0, 30)\n\n # \u521b\u5efa\u4e00\u4e2a\u5b50\u4e3b\u9898\u7684\u5b50\u4e3b\u9898\n sub_topic1_1 = sub_topic1.addSubTopic()\n sub_topic1_1.setTitle(\"I'm a sub topic too\")\n```\n\n![second sheet](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/second_sheet.png)\n\n```\ndef gen_sheet2(workbook, sheet1):\n # ***** \u8bbe\u8ba1\u7b2c\u4e8c\u4e2a\u753b\u5e03 *****\n sheet2 = workbook.createSheet()\n sheet2.setTitle(\"second sheet\")\n\n # \u83b7\u53d6\u753b\u5e03\u7684\u4e2d\u5fc3\u4e3b\u9898\n root_topic2 = sheet2.getRootTopic()\n root_topic2.setTitle(\"root node\")\n\n # \u4f7f\u7528\u53e6\u5916\u4e00\u79cd\u65b9\u6cd5\u521b\u5efa\u5b50\u4e3b\u9898\n topic1 = TopicElement(ownerWorkbook=workbook)\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u4e3b\u9898\u95f4\u8d85\u94fe\u63a5\uff0c\u901a\u8fc7\u6307\u5b9a\u76ee\u6807\u4e3b\u9898ID\u5373\u53ef\uff0c\u8fd9\u91cc\u94fe\u63a5\u5230\u7b2c\u4e00\u4e2a\u753b\u5e03\n topic1.setTopicHyperlink(sheet1.getID())\n topic1.setTitle(\"redirection to the first sheet\")\n\n topic2 = TopicElement(ownerWorkbook=workbook)\n topic2.setTitle(\"topic with an url hyperlink\")\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2aURL\u8d85\u94fe\u63a5\n topic2.setURLHyperlink(\"https://github.com/zhuifengshen/xmind\")\n\n topic3 = TopicElement(ownerWorkbook=workbook)\n topic3.setTitle(\"third node\")\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u5907\u6ce8\uff08\u5feb\u6377\u952eF4)\n topic3.setPlainNotes(\"notes for this topic\")\n topic3.setTitle(\"topic with \\n notes\")\n\n topic4 = TopicElement(ownerWorkbook=workbook)\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u6587\u4ef6\u8d85\u94fe\u63a5\n topic4.setFileHyperlink(\"logo.png\")\n topic4.setTitle(\"topic with a file\")\n\n topic1_1 = TopicElement(ownerWorkbook=workbook)\n topic1_1.setTitle(\"sub topic\")\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u6807\u7b7e\uff08\u76ee\u524dXMind\u8f6f\u4ef6\u4ec5\u652f\u6301\u6dfb\u52a0\u4e00\u4e2a\uff0c\u5feb\u6377\u952e\uff09\n topic1_1.addLabel(\"a label\")\n\n topic1_1_1 = TopicElement(ownerWorkbook=workbook)\n topic1_1_1.setTitle(\"topic can add multiple markers\")\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e24\u4e2a\u56fe\u6807\n topic1_1_1.addMarker(MarkerId.starBlue)\n topic1_1_1.addMarker(MarkerId.flagGreen)\n\n topic2_1 = TopicElement(ownerWorkbook=workbook)\n topic2_1.setTitle(\"topic can add multiple comments\")\n # \u7ed9\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u6279\u6ce8\uff08\u8bc4\u8bba\uff09\n topic2_1.addComment(\"I'm a comment!\")\n topic2_1.addComment(content=\"Hello comment!\", author='devin')\n\n # \u5c06\u521b\u5efa\u597d\u7684\u5b50\u4e3b\u9898\u6dfb\u52a0\u5230\u5176\u7236\u4e3b\u9898\u4e0b\n root_topic2.addSubTopic(topic1)\n root_topic2.addSubTopic(topic2)\n root_topic2.addSubTopic(topic3)\n root_topic2.addSubTopic(topic4)\n topic1.addSubTopic(topic1_1)\n topic2.addSubTopic(topic2_1)\n topic1_1.addSubTopic(topic1_1_1)\n\n # \u7ed9\u4e2d\u5fc3\u4e3b\u9898\u4e0b\u7684\u6bcf\u4e2a\u5b50\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u4f18\u5148\u7ea7\u56fe\u6807\n topics = root_topic2.getSubTopics()\n for index, topic in enumerate(topics):\n topic.addMarker(\"priority-\" + str(index + 1))\n\n # \u6dfb\u52a0\u4e00\u4e2a\u4e3b\u9898\u4e0e\u4e3b\u9898\u4e4b\u95f4\u7684\u8054\u7cfb\n sheet2.createRelationship(topic1.getID(), topic2.getID(), \"relationship test\") \n```\n\u5177\u4f53\u4ee3\u7801\u53c2\u8003\uff1a[create_xmind.py](https://github.com/zhuifengshen/xmind/blob/master/example/create_xmind.py)\n\n\n#### 2\u3001\u89e3\u6790XMind\u6587\u4ef6\n\n##### (1) \u5c06XMind\u6587\u4ef6\u8f6c\u6362\u4e3aDict\u6570\u636e / JSON\u6570\u636e\n```\nimport xmind\nworkbook = xmind.load('demo.xmind')\nprint(workbook.getData())\nprint(workbook.to_prettify_json())\n\n\nOutput:\n\n[ # \u753b\u5e03\u5217\u8868\n { # \u7b2c1\u4e2a\u753b\u5e03\u6570\u636e\n \"id\": \"2cc3b068922063a81a20029655\", # \u753b\u5e03ID\n \"title\": \"first sheet\", # \u753b\u5e03\u540d\u79f0\n \"topic\": { # \u4e2d\u5fc3\u4e3b\u9898\n \"id\": \"2cc3b06892206f95288e487b6c\", # \u4e3b\u9898ID\n \"link\": null, # \u8d85\u94fe\u63a5\u4fe1\u606f\n \"title\": \"root node\", # \u4e3b\u9898\u540d\u79f0\n \"note\": null, # \u5907\u6ce8\u4fe1\u606f\n \"label\": null, # \u4fbf\u7b7e\u4fe1\u606f\n \"comment\": null, # \u6279\u6ce8(\u8bc4\u8bba)\u4fe1\u606f\n \"markers\": [], # \u56fe\u6807\u5217\u8868\n \"topics\": [ # \u5b50\u4e3b\u9898\u5217\u8868\n {\n \"id\": \"2cc3b06892206c816e1cb55ddc\", # \u5b50\u4e3b\u9898ID\n \"link\": null,\n \"title\": \"first sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [ # \u5b50\u4e3b\u9898\u4e0b\u7684\u5b50\u4e3b\u9898\u5217\u8868\n {\n \"id\": \"b0ed74214dbca939935b981906\",\n \"link\": null,\n \"title\": \"I'm a sub topic too\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n },\n {\n \"id\": \"b0ed74214dbca693b947ef03fa\",\n \"link\": null,\n \"title\": \"second sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbca1fe9ade911b94\",\n \"link\": null,\n \"title\": \"third sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbcac00c0eb368b53\",\n \"link\": null,\n \"title\": \"fourth sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n }\n },\n {\n \"id\": \"b0ed74214dbcafdd0799f81ebf\",\n \"title\": \"second sheet\", # \u7b2c2\u4e2a\u753b\u5e03\u6570\u636e\n \"topic\": {\n \"id\": \"b0ed74214dbcac7567f88365c2\",\n \"link\": null,\n \"title\": \"root node\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"b0ed74214dbca8bfdc2b60df47\",\n \"link\": \"xmind:#2cc3b068922063a81a20029655\",\n \"title\": \"redirection to the first sheet\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [\n \"priority-1\"\n ],\n \"topics\": [\n {\n \"id\": \"e613d79938591579e707a7a161\",\n \"link\": null,\n \"title\": \"sub topic\",\n \"note\": null,\n \"label\": \"a label\",\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"e613d799385912cca5eb579fb3\",\n \"link\": null,\n \"title\": \"topic can add multiple markers\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [\n \"star-blue\",\n \"flag-green\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"e613d79938591ef98b64a768db\",\n \"link\": \"https://xmind.net\",\n \"title\": \"topic with an url hyperlink\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [\n \"priority-2\"\n ],\n \"topics\": [\n {\n \"id\": \"e613d799385916ed8f3ea382ca\",\n \"link\": null,\n \"title\": \"topic can add multiple comments\",\n \"note\": null,\n \"label\": null,\n \"comment\": \"I'm a comment!\\nHello comment!\",\n \"markers\": []\n }\n ]\n },\n {\n \"id\": \"e613d799385919451116404d66\",\n \"link\": null,\n \"title\": \"topic with \\n notes\",\n \"note\": \"notes for this topic\",\n \"label\": null,\n \"comment\": null,\n \"markers\": [\n \"priority-3\"\n ]\n },\n {\n \"id\": \"e613d7993859156671fa2c12a5\",\n \"link\": \"file:///Users/zhangchuzhao/Project/python/tmp/xmind/example/xminddemo/logo.png\",\n \"title\": \"topic with a file\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [\n \"priority-4\"\n ]\n }\n ]\n }\n }\n]\n```\n\n##### \uff082\uff09\u5c06\u753b\u5e03\u8f6c\u6362\u4e3aDict\u6570\u636e\n```\nimport xmind\nworkbook = xmind.load('demo.xmind')\nsheet = workbook.getPrimarySheet()\nprint(sheet.getData())\n\n\nOutput:\n\n{\n \"id\": \"2cc3b068922063a81a20029655\",\n \"title\": \"first sheet\",\n \"topic\": {\n \"id\": \"2cc3b06892206f95288e487b6c\",\n \"link\": null,\n \"title\": \"root node\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"2cc3b06892206c816e1cb55ddc\",\n \"link\": null,\n \"title\": \"first sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"b0ed74214dbca939935b981906\",\n \"link\": null,\n \"title\": \"I'm a sub topic too\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n },\n {\n \"id\": \"b0ed74214dbca693b947ef03fa\",\n \"link\": null,\n \"title\": \"second sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbca1fe9ade911b94\",\n \"link\": null,\n \"title\": \"third sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbcac00c0eb368b53\",\n \"link\": null,\n \"title\": \"fourth sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n }\n}\n```\n\n##### (3) \u5c06\u4e3b\u9898\u8f6c\u6362\u4e3aDict\u6570\u636e\n```\nimport xmind\nworkbook = xmind.load('demo.xmind')\nsheet = workbook.getPrimarySheet()\nroot_topic = sheet.getRootTopic()\nprint(root_topic.getData())\n\n\nOutput:\n\n{\n \"id\": \"2cc3b06892206f95288e487b6c\",\n \"link\": null,\n \"title\": \"root node\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"2cc3b06892206c816e1cb55ddc\",\n \"link\": null,\n \"title\": \"first sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": [],\n \"topics\": [\n {\n \"id\": \"b0ed74214dbca939935b981906\",\n \"link\": null,\n \"title\": \"I'm a sub topic too\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n },\n {\n \"id\": \"b0ed74214dbca693b947ef03fa\",\n \"link\": null,\n \"title\": \"second sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbca1fe9ade911b94\",\n \"link\": null,\n \"title\": \"third sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n },\n {\n \"id\": \"b0ed74214dbcac00c0eb368b53\",\n \"link\": null,\n \"title\": \"fourth sub topic\",\n \"note\": null,\n \"label\": null,\n \"comment\": null,\n \"markers\": []\n }\n ]\n}\n```\n\n##### (4) \u81ea\u5b9a\u4e49\u89e3\u6790\n```\nimport xmind\nworkbook = xmind.load('demo.xmind')\ncustom_parse_xmind(workbook)\n\n\ndef custom_parse_xmind(workbook):\n elements = {}\n\n def _echo(tag, element, indent=0):\n title = element.getTitle()\n elements[element.getID()] = title\n print('\\t' * indent, tag, ':', pipes.quote(title))\n\n def dump_sheet(sheet):\n root_topic = sheet.getRootTopic()\n _echo('RootTopic', root_topic, 1)\n\n for topic in root_topic.getSubTopics() or []:\n _echo('AttachedSubTopic', topic, 2)\n\n for topic in root_topic.getSubTopics(xmind.core.const.TOPIC_DETACHED) or []:\n _echo('DetachedSubtopic', topic, 2)\n\n for rel in sheet.getRelationships():\n id1, id2 = rel.getEnd1ID(), rel.getEnd2ID()\n print('Relationship: [%s] --> [%s]' % (elements.get(id1), elements.get(id2)))\n\n for sheet in workbook.getSheets():\n _echo('Sheet', sheet)\n dump_sheet(sheet)\n\n\nOutput:\n\n Sheet : 'first sheet'\n\t RootTopic : 'root node'\n\t\t AttachedSubTopic : 'first sub topic'\n\t\t AttachedSubTopic : 'second sub topic'\n\t\t AttachedSubTopic : 'third sub topic'\n\t\t AttachedSubTopic : 'fourth sub topic'\n\t\t DetachedSubtopic : 'detached topic'\n Sheet : 'second sheet'\n\t RootTopic : 'root node'\n\t\t AttachedSubTopic : 'redirection to the first sheet'\n\t\t AttachedSubTopic : 'topic with an url hyperlink'\n\t\t AttachedSubTopic : 'topic with \n notes'\n\t\t AttachedSubTopic : 'topic with a file'\nRelationship: [redirection to the first sheet] --> [topic with an url hyperlink]\n```\n\u5177\u4f53\u4ee3\u7801\u53c2\u8003\uff1a[parse_xmind.py](https://github.com/zhuifengshen/xmind/blob/master/example/parse_xmind.py)\n\n\n#### 3\u3001\u66f4\u65b0\u4fdd\u5b58XMind\u6587\u4ef6\n\n##### \uff081\uff09\u4e94\u79cd\u4fdd\u5b58\u65b9\u6cd5\n```\nimport xmind\n# \u52a0\u8f7dXMind\u6587\u4ef6demo.xmind\nworkbook = xmind.load('demo.xmind') \nprimary_sheet = workbook.getPrimarySheet()\nroot_topic = primary_sheet.getRootTopic()\n# \u7ed9\u4e2d\u5fc3\u4e3b\u9898\u6dfb\u52a0\u4e00\u4e2a\u661f\u661f\u56fe\u6807\nroot_topic.addMarker(MarkerId.starRed)\n\n# \u7b2c1\u79cd\uff1a\u9ed8\u8ba4\u4fdd\u5b58\u6240\u6709\u7684\u5185\u5bb9\uff0c\u8fd9\u91cc\u4fdd\u5b58\u65f6\u53e6\u5b58\u4e3axmind_update_demo.xmind\uff08\u63a8\u8350\uff09\nxmind.save(workbook=workbook, path='xmind_update_demo.xmind')\n\n# \u7b2c2\u79cd\uff1a\u53ea\u4fdd\u5b58\u601d\u7ef4\u5bfc\u56fe\u5185\u5bb9content.xml\u6838\u5fc3\u6587\u4ef6\uff0c\u9002\u7528\u4e8e\u6ca1\u6709\u6dfb\u52a0\u8bc4\u8bba\u3001\u81ea\u5b9a\u4e49\u6837\u5f0f\u548c\u9644\u4ef6\u7684\u60c5\u51b5\nxmind.save(workbook=workbook, path='xmind_update_demo1.xmind', only_content=True)\n\n# \u7b2c3\u79cd\uff1a\u53ea\u4fdd\u5b58content.xml\u3001comments.xml\u3001styles.xml\u4e09\u4e2a\u6838\u5fc3\u6587\u4ef6\uff0c\u9002\u7528\u4e8e\u6ca1\u6709\u9644\u4ef6\u7684\u60c5\u51b5\nxmind.save(workbook=workbook, path='xmind_update_demo2.xmind', except_attachments=True)\n\n# 4\u3001\u9664\u4e86\u4fee\u6539\u8bb0\u5f55\uff0c\u5176\u4ed6\u5185\u5bb9\u90fd\u4fdd\u5b58\uff0c\u56e0\u4e3aXMind\u6587\u4ef6\u7684\u4fee\u6539\u8bb0\u5f55\u6587\u4ef6\u5939\u6bd4\u8f83\u5927\uff0c\u4ee5\u4fbf\u8282\u7ea6\u5185\u5b58\uff08\u63a8\u8350\uff09\nxmind.save(workbook=workbook, path='xmind_update_demo3.xmind', except_revisions=True)\n\n# 5\u3001\u4e0d\u6307\u5b9a\u4fdd\u5b58\u8def\u5f84\uff0c\u76f4\u63a5\u66f4\u65b0\u539f\u6587\u4ef6\nxmind.save(workbook)\n```\n\u5177\u4f53\u4ee3\u7801\u53c2\u8003\uff1a[update_xmind.py](https://github.com/zhuifengshen/xmind/blob/master/example/update_xmind.py)\n\n\n##### \uff082\uff09XMind\u6587\u4ef6\u7ed3\u6784\n\n![xmind file structure](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/xmind_file_structure.png)\n\n\n### \u56db\u3001\u5de5\u5177\u652f\u6301\u529f\u80fd\n\n#### 1\u3001\u652f\u6301XMind\u4ee5\u4e0b\u539f\u751f\u5143\u7d20\u7684\u521b\u5efa\u3001\u89e3\u6790\u548c\u66f4\u65b0\n- \u753b\u5e03(Sheet)\n- \u4e3b\u9898(Topic\uff1a\u56fa\u5b9a\u4e3b\u9898\u3001\u81ea\u7531\u4e3b\u9898)\n- \u56fe\u6807(Marker\uff1a[\u56fe\u6807\u540d\u79f0](https://github.com/zhuifengshen/xmind/blob/master/xmind/core/markerref.py))\n- \u5907\u6ce8(Note)\n- \u6807\u7b7e(Label)\n- \u6279\u6ce8(Comment)\n- \u8054\u7cfb(Relationship)\n- \u6837\u5f0f(Styles)\n\n#### 2\u3001XMind\u539f\u751f\u5143\u7d20\n\n![xmind_native_elements](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/xmind_native_elements.png)\n\n\u5176\u4e2d\uff0c\u6682\u4e0d\u652f\u6301\u7684\u5143\u7d20\uff08\u65e5\u5e38\u4e5f\u6bd4\u8f83\u5c11\u7528\u5230\uff09\n- \u6807\u6ce8\uff08cllout topic)\n- \u6982\u8981\uff08summary topic)\n- \u5916\u6846\uff08outline border)\n- \u9644\u4ef6\n\n\n### \u4e94\u3001\u5e94\u7528\u573a\u666f\n\n[XMind2TestCase](https://github.com/zhuifengshen/xmind2testcase)\uff1a\u4e00\u4e2a\u9ad8\u6548\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u7684\u89e3\u51b3\u65b9\u6848\uff01\n\n\u8be5\u65b9\u6848\u901a\u8fc7\u5236\u5b9a\u6d4b\u8bd5\u7528\u4f8b\u901a\u7528\u6a21\u677f\uff0c \u7136\u540e\u4f7f\u7528 XMind \u8fd9\u6b3e\u5e7f\u4e3a\u6d41\u4f20\u4e14\u5f00\u6e90\u7684\u601d\u7ef4\u5bfc\u56fe\u5de5\u5177\u8fdb\u884c\u7528\u4f8b\u8bbe\u8ba1\u3002\n\n\u7136\u540e\u57fa\u4e8e\u901a\u7528\u7684\u6d4b\u8bd5\u7528\u4f8b\u6a21\u677f\uff0c\u5728 XMind \u6587\u4ef6\u4e0a\u89e3\u6790\u5e76\u63d0\u53d6\u51fa\u6d4b\u8bd5\u7528\u4f8b\u6240\u9700\u7684\u57fa\u672c\u4fe1\u606f\uff0c \u5408\u6210\u5e38\u89c1\u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406\u7cfb\u7edf\u6240\u9700\u7684\u7528\u4f8b\u5bfc\u5165\u6587\u4ef6\u3002\n\n\u5b9e\u73b0\u5c06 XMind \u8bbe\u8ba1\u6d4b\u8bd5\u7528\u4f8b\u7684\u4fbf\u5229\u4e0e\u5e38\u89c1\u6d4b\u8bd5\u7528\u4f8b\u7cfb\u7edf\u7684\u9ad8\u6548\u7ba1\u7406\u5b8c\u7f8e\u7ed3\u5408\u8d77\u6765\u4e86\uff0c\u63d0\u5347\u65e5\u5e38\u6d4b\u8bd5\u5de5\u4f5c\u7684\u6548\u7387\uff01\n\n\u4f7f\u7528\u6d41\u7a0b\u5982\u4e0b\uff1a\n\n#### 1\u3001\u4f7f\u7528Web\u5de5\u5177\u8fdb\u884cXMind\u7528\u4f8b\u6587\u4ef6\u89e3\u6790\n\n![webtool](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/webtool.png)\n\n#### 2\u3001\u8f6c\u6362\u540e\u7684\u7528\u4f8b\u9884\u89c8\n\n![testcase preview](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/testcase_preview.png)\n\n#### 3\u3001\u7528\u4f8b\u5bfc\u5165TestLink\u7cfb\u7edf\n\n![testlink](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/testlink.png)\n\n#### 4\u3001\u7528\u4f8b\u5bfc\u5165Zentao\uff08\u7985\u9053\uff09\u7cfb\u7edf\n\n![zentao](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/zentao.png)\n\n\n### \u516d\u3001\u81ea\u52a8\u5316\u6d4b\u8bd5\u4e0e\u53d1\u5e03\n\n#### 1\u3001\u81ea\u52a8\u5316\u5355\u5143\u6d4b\u8bd5(TODO: \u5f85\u4e0a\u4f20)\n```\npython3 -m unittest discover\n```\n\n#### 2\u3001\u4e00\u952e\u6253 Tag \u5e76\u4e0a\u4f20\u81f3 PYPI \n\n\u6bcf\u6b21\u5728 __ about __.py \u66f4\u65b0\u7248\u672c\u53f7\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5b9e\u73b0\u81ea\u52a8\u5316\u66f4\u65b0\u6253\u5305\u4e0a\u4f20\u81f3 [PYPI](https://pypi.org/) \uff0c\u540c\u65f6\u6839\u636e\u5176\u7248\u672c\u53f7\u81ea\u52a8\u6253 Tag \u5e76\u63a8\u9001\u5230\u4ed3\u5e93\uff1a\n```\npython3 setup.py pypi\n```\n![upload pypi](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/pypi_upload.png)\n\n\n\n\n### \u4e03\u3001\u81f4\u8c22\n\u5728\u6b64\uff0c\u8877\u5fc3\u611f\u8c22 **XMind \u601d\u7ef4\u5bfc\u56fe**\u5b98\u65b9\u521b\u9020\u4e86\u8fd9\u4e48\u4e00\u6b3e\u6fc0\u53d1\u7075\u611f\u3001\u521b\u610f\uff0c\u63d0\u5347\u5de5\u4f5c\u3001\u751f\u6d3b\u6548\u7387\u7684\u9ad8\u4ef7\u503c\u751f\u4ea7\u529b\u4ea7\u54c1\uff0c\n\u540c\u65f6\u8fd8\u5f00\u6e90 [xmind-sdk-python](https://github.com/xmindltd/xmind-sdk-python) \u5de5\u5177\u5e2e\u52a9\u5f00\u53d1\u8005\u6784\u5efa\u81ea\u5df1\u7684 XMind \u6587\u4ef6 \uff0c\u672c\u9879\u76ee\u6b63\u662f\u57fa\u4e8e\u6b64\u5de5\u5177\u8fdb\u884c\u6269\u5c55\u548c\u5347\u7ea7\uff0c\u53d7\u76ca\u532a\u6d45\uff0c\u611f\u6069\uff01\n\n\u5f97\u76ca\u4e8e\u5f00\u6e90\uff0c\u4e5f\u5c06\u575a\u6301\u5f00\u6e90\uff0c\u5e76\u4e3a\u5f00\u6e90\u8d21\u732e\u81ea\u5df1\u7684\u70b9\u6ef4\u4e4b\u529b\u3002\u540e\u7eed\uff0c\u5c06\u7ee7\u7eed\u6839\u636e\u5b9e\u9645\u9879\u76ee\u9700\u8981\uff0c\u5b9a\u671f\u8fdb\u884c\u7ef4\u62a4\u66f4\u65b0\u548c\u5b8c\u5584\uff0c\u6b22\u8fce\u5927\u4f19\u7684\u4f7f\u7528\u548c[\u610f\u89c1\u53cd\u9988](https://github.com/zhuifengshen/xmind/issues/new)\uff0c\u8c22\u8c22\uff01\n\n\uff08\u5982\u679c\u672c\u9879\u76ee\u5bf9\u4f60\u6709\u5e2e\u52a9\u7684\u8bdd\uff0c\u4e5f\u6b22\u8fce _**[star](https://github.com/zhuifengshen/xmind)**_ \uff09\n\n\n![QA\u4e4b\u7985](http://upload-images.jianshu.io/upload_images/139581-27c6030ba720846f.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n\n### LICENSE\n```\nThe MIT License (MIT)\n\nCopyright (c) 2019 Devin https://zhangchuzhao.site\nCopyright (c) 2013 XMind, Ltd\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 of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject 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, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zhuifengshen/xmind", "keywords": "xmind, mind mapping, \u601d\u7ef4\u5bfc\u56fe, XMind\u601d\u7ef4\u5bfc\u56fe", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "XMind", "package_url": "https://pypi.org/project/XMind/", "platform": "", "project_url": "https://pypi.org/project/XMind/", "project_urls": { "Homepage": "https://github.com/zhuifengshen/xmind" }, "release_url": "https://pypi.org/project/XMind/1.2.0/", "requires_dist": null, "requires_python": ">=3.0, <4", "summary": "XMind\u662f\u57fa\u4e8ePython\u5b9e\u73b0\uff0c\u63d0\u4f9b\u4e86\u5bf9XMind\u601d\u7ef4\u5bfc\u56fe\u8fdb\u884c\u521b\u5efa\u3001\u89e3\u6790\u3001\u66f4\u65b0\u7684\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848\uff01", "version": "1.2.0" }, "last_serial": 4680683, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "4d7edd742f1ea7fa60ab2cccaae9138d", "sha256": "37c0a2cc394fe2624fafb1250731836feebbc429ce281deb0bc0ce624e428c0c" }, "downloads": -1, "filename": "XMind-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4d7edd742f1ea7fa60ab2cccaae9138d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0, <4", "size": 27218, "upload_time": "2018-12-24T12:34:00", "url": "https://files.pythonhosted.org/packages/f9/35/df3a6d1af58af7d99c23bf070739795f55ee5b924bf358734c195d840a3a/XMind-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a01d60015a4889b642046aec61bfbaec", "sha256": "16809c8812b301adce1c89784062c931c2460c183ddf3fb843deddd09b099f71" }, "downloads": -1, "filename": "XMind-0.9.0.tar.gz", "has_sig": false, "md5_digest": "a01d60015a4889b642046aec61bfbaec", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0, <4", "size": 20408, "upload_time": "2018-12-24T12:34:03", "url": "https://files.pythonhosted.org/packages/db/47/a6dc5c4b1138139a9ad07c12560fe5dbc8fc46ddae9674dd73ac3ba8b421/XMind-0.9.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "776ff4e155fdf142b61e70dce46f447d", "sha256": "abf868a77c3021ed48f974d439b8ce70a3f9734212187659cd7263674fd88aaa" }, "downloads": -1, "filename": "XMind-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "776ff4e155fdf142b61e70dce46f447d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0, <4", "size": 31372, "upload_time": "2018-12-29T09:57:02", "url": "https://files.pythonhosted.org/packages/8a/c5/30d029c815a577e485b00c2b14cfdbc6fd0fa1e4736574bc45ebf6b6bbdf/XMind-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7761612753330d1f7c47d79dc3cc2b4a", "sha256": "b49b3b672dc167c226b258cfbbec904e4a11c652e1542baf63e26ee6a74f2e09" }, "downloads": -1, "filename": "XMind-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7761612753330d1f7c47d79dc3cc2b4a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0, <4", "size": 26106, "upload_time": "2018-12-29T09:57:04", "url": "https://files.pythonhosted.org/packages/95/6b/7b188e0cd9d4b292dba5214ea49c65c444da529fdc4fbff5988d8a564ccf/XMind-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "01b25864cc5b52e9a6502cd9e5d73121", "sha256": "eb91ee837e05522f07abcc97e2feeb42c7bed0a6764fa8d59339509bf6211b04" }, "downloads": -1, "filename": "XMind-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "01b25864cc5b52e9a6502cd9e5d73121", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0, <4", "size": 31419, "upload_time": "2018-12-30T12:37:21", "url": "https://files.pythonhosted.org/packages/ba/26/1cc8d8cfaf71922fb47174e5d4bb57e95893e54aefa095a046f1ab14f9a6/XMind-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "237a44f7f3f54bef4c3684f868083388", "sha256": "7937f60c78b85251fecc75bcff0ca6ae23da652db9b206f2f07cc86a6f230178" }, "downloads": -1, "filename": "XMind-1.1.0.tar.gz", "has_sig": false, "md5_digest": "237a44f7f3f54bef4c3684f868083388", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0, <4", "size": 26493, "upload_time": "2018-12-30T12:37:24", "url": "https://files.pythonhosted.org/packages/32/f2/a4cff3575a275654f55486df9e0ec0491b1c5add2d36f21d0cadb6ff1454/XMind-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "7b21cbe2604ac96290887f54067a421a", "sha256": "3dddc2db2cc404adf4e8d8e83f4d92e5eda5d94c468cecb047dcc99afc3a4f3d" }, "downloads": -1, "filename": "XMind-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b21cbe2604ac96290887f54067a421a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0, <4", "size": 31936, "upload_time": "2019-01-10T11:09:48", "url": "https://files.pythonhosted.org/packages/87/04/3dfc179cb13ed20f1b6e592a883344893eb8973d417681b1ce82dd0f7367/XMind-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc9bcf69a3120142d57fbca7b0313702", "sha256": "7641a4adf1c0a33fe0d5f515d86deba28ef3b3bcfaff2cffb2d5f6520ffa976e" }, "downloads": -1, "filename": "XMind-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cc9bcf69a3120142d57fbca7b0313702", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0, <4", "size": 27121, "upload_time": "2019-01-10T11:09:50", "url": "https://files.pythonhosted.org/packages/7c/8c/e13a82fa9b0394c0d58248196d7d51d7274407cdebc1df36b76034ab990d/XMind-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b21cbe2604ac96290887f54067a421a", "sha256": "3dddc2db2cc404adf4e8d8e83f4d92e5eda5d94c468cecb047dcc99afc3a4f3d" }, "downloads": -1, "filename": "XMind-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b21cbe2604ac96290887f54067a421a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.0, <4", "size": 31936, "upload_time": "2019-01-10T11:09:48", "url": "https://files.pythonhosted.org/packages/87/04/3dfc179cb13ed20f1b6e592a883344893eb8973d417681b1ce82dd0f7367/XMind-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc9bcf69a3120142d57fbca7b0313702", "sha256": "7641a4adf1c0a33fe0d5f515d86deba28ef3b3bcfaff2cffb2d5f6520ffa976e" }, "downloads": -1, "filename": "XMind-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cc9bcf69a3120142d57fbca7b0313702", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0, <4", "size": 27121, "upload_time": "2019-01-10T11:09:50", "url": "https://files.pythonhosted.org/packages/7c/8c/e13a82fa9b0394c0d58248196d7d51d7274407cdebc1df36b76034ab990d/XMind-1.2.0.tar.gz" } ] }