{"id":15991915,"url":"https://github.com/mrgvsv/coggle-ecs","last_synced_at":"2026-05-14T19:32:02.694Z","repository":{"id":62563390,"uuid":"230422513","full_name":"MrGVSV/coggle-ecs","owner":"MrGVSV","description":"Parse Coggle maps for ECS data","archived":false,"fork":false,"pushed_at":"2019-12-27T14:35:52.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T17:29:18.160Z","etag":null,"topics":["coggle","ecs","game-development","mindmaps","planning"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/coggle-ecs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrGVSV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-27T10:18:25.000Z","updated_at":"2019-12-27T14:35:55.000Z","dependencies_parsed_at":"2022-11-03T15:45:14.648Z","dependency_job_id":null,"html_url":"https://github.com/MrGVSV/coggle-ecs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGVSV%2Fcoggle-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGVSV%2Fcoggle-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGVSV%2Fcoggle-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGVSV%2Fcoggle-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrGVSV","download_url":"https://codeload.github.com/MrGVSV/coggle-ecs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241354999,"owners_count":19949291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coggle","ecs","game-development","mindmaps","planning"],"created_at":"2024-10-08T06:04:06.717Z","updated_at":"2026-05-14T19:32:02.651Z","avatar_url":"https://github.com/MrGVSV.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoggleECS\n\nCoggleECS is a small tool used to parse `.mm` files created at [coggle.it](https://coggle.it) for ECS data. It can then output ECS data as a tree or table. It can also be used to simply show links in your map.\n\nFor instance, Coggle creates links between nodes using a markdown format: `Player [#](#5d3adc) [#](#78959d)`. CoggleECS will replace those links with their respective nodes: `Player \u003cMove,  Transform\u003e`.\n\n\n\n## Installation\n\n### Using pip [![PyPI version](https://badge.fury.io/py/coggle-ecs.svg)](https://badge.fury.io/py/coggle-ecs)\n\nRun the following line in the terminal:\n\n`pip install coggle-ecs`\n\n### Using setup.py\n\nClone or download this repository and run the following line from the project's root directory:\n\n`python setup.py install`\n\n### Using Ctl+C\n\nCopy and paste if you're daring enough.\n\n \n\n## Setup \u0026 Usage\n\n### 1. In Coggle\n\nOutputting as tree data can work for any type of Coggle map (in fact you can just export the map itself as a text tree from Coggle if you don't care about replacing links). \n\nHowever, outputting as a table requires a few things:\n\n1. There **needs** to be nodes named each of the following (not case-sensitive):\n   * 'Entitities' or 'Entity' or 'E'\n   * 'Components' or 'Component' or 'C'\n   * 'Systems' or 'System' or 'S'\n2. Entities should link **to** their respective Components.\n3. Systems should link **to** their respective Components.\n\nWithout the three nodes, the table will not render. And if those nodes exist but there are no links (or improper ones) then table will be be unfilled.\n\n### 2. In CoggleECS\n\nOnce the above steps have been completed and your map has been filled, download it as a `.mm`. Then follow a similar program to below:\n\n```python\nfrom coggle_ecs import CoggleECS\nmy_map = CoggleECS('path/to/your/map.mm')\nmy_map.parse()\n```\n\nYou're all set to use `my_map` (or whatever you named it) to export in whatever format you prefer!\n\n\n\n## Examples\n\n### Input\n\n```xml\n\u003cmap version=\"0.9.0\"\u003e\n    \u003cnode TEXT=\"Game Engine\" FOLDED=\"false\" POSITION=\"right\" ID=\"5e0568ca68fbc74e9bb7c666\" X_COGGLE_POSX=\"0\" X_COGGLE_POSY=\"0\"\u003e\n        \u003cedge COLOR=\"#b4b4b4\"/\u003e\n        \u003cfont NAME=\"Helvetica\" SIZE=\"17\"/\u003e\n        \u003cnode TEXT=\"Entities\" FOLDED=\"false\" POSITION=\"right\" ID=\"c2876d86e931f9deab2da00f\"\u003e\n            \u003cedge COLOR=\"#ebd95f\"/\u003e\n            \u003cfont NAME=\"Helvetica\" SIZE=\"15\"/\u003e\n            \u003cnode TEXT=\"Player [#](#5d3adc) [#](#78959d)\" FOLDED=\"false\" POSITION=\"right\" ID=\"2fbd2a01b1c71bd12bcbcb6b\"\u003e\n                \u003cedge COLOR=\"#ecd966\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n                \u003cnode TEXT=\"This is some description.\" FOLDED=\"false\" POSITION=\"right\" ID=\"b5b0332157c9287b3640d066\"\u003e\n                    \u003cedge COLOR=\"#ecd870\"/\u003e\n                    \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n                \u003c/node\u003e\n            \u003c/node\u003e\n            \u003cnode TEXT=\"Alien [#](#78959d) [#](#feee8a)\" FOLDED=\"false\" POSITION=\"right\" ID=\"22db55a2c98a51c71bca1791\"\u003e\n                \u003cedge COLOR=\"#ead86c\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n        \u003c/node\u003e\n        \u003cnode TEXT=\"Components\" FOLDED=\"false\" POSITION=\"right\" ID=\"abed60d3595a05321d843d5c\"\u003e\n            \u003cedge COLOR=\"#efa670\"/\u003e\n            \u003cfont NAME=\"Helvetica\" SIZE=\"15\"/\u003e\n            \u003cnode TEXT=\"Hostile\" FOLDED=\"false\" POSITION=\"right\" ID=\"feee8a5d3ea26d514852b5db\"\u003e\n                \u003cedge COLOR=\"#eea26d\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n            \u003cnode TEXT=\"Transform\" FOLDED=\"false\" POSITION=\"right\" ID=\"78959d52cbc1843fb429b409\"\u003e\n                \u003cedge COLOR=\"#ee9d65\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n            \u003cnode TEXT=\"Move\" FOLDED=\"false\" POSITION=\"right\" ID=\"5d3adc4deef6b0da6ebcc899\"\u003e\n                \u003cedge COLOR=\"#f09e65\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n        \u003c/node\u003e\n        \u003cnode TEXT=\"Systems\" FOLDED=\"false\" POSITION=\"right\" ID=\"36c5720bc10e612f2a18cad1\"\u003e\n            \u003cedge COLOR=\"#e68782\"/\u003e\n            \u003cfont NAME=\"Helvetica\" SIZE=\"15\"/\u003e\n            \u003cnode TEXT=\"Movement System [#](#5d3adc) [#](#78959d)\" FOLDED=\"false\" POSITION=\"right\" ID=\"22e2424c6291b42cd61178e7\"\u003e\n                \u003cedge COLOR=\"#e37e7b\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n            \u003cnode TEXT=\"Enemy System [#](#feee8a)\" FOLDED=\"false\" POSITION=\"right\" ID=\"0ed47a23e497face721424d9\"\u003e\n                \u003cedge COLOR=\"#e78682\"/\u003e\n                \u003cfont NAME=\"Helvetica\" SIZE=\"13\"/\u003e\n            \u003c/node\u003e\n        \u003c/node\u003e\n        \u003cnode TEXT=\"Art\" FOLDED=\"false\" POSITION=\"left\" ID=\"14bf08663116d2383d6c20f3\"\u003e\n            \u003cedge COLOR=\"#e096e9\"/\u003e\n            \u003cfont NAME=\"Helvetica\" SIZE=\"15\"/\u003e\n        \u003c/node\u003e\n    \u003c/node\u003e\n\u003c/map\u003e\n```\n\n### Output\n\n```\nGame Engine\n    Entities\n        Player \u003cMove,  Transform\u003e\n            This is some description.\n        Alien \u003cTransform,  Hostile\u003e\n    Components\n        Hostile\n        Transform\n        Move\n    Systems\n        Movement System \u003cMove,  Transform\u003e\n        Enemy System \u003cHostile\u003e\n    Art\n```\n\n```\n                       Hostile Transform Move\nType   Name                                  \nEntity Player                          X    X\n       Alien                 X         X     \nSystem Movement System                 X    X\n       Enemy System          X               \n```\n\n\n\n## Output Functions\n\n```python\noutput_text(self, outfile, delim=' ', indent=4, include_id=False)\n```\n\nOutput the map as a tree into a text file.\n\n​\t\t*outfile*: The output file\n\n​\t\t*delim*: Prepends node (Used to denote the level)\n\n​\t\t*indent*: Number of delims to print\n\n​\t\t*include_id*: Include the node's id at the end\n\n```python\noutput_structure(self, outfile, indent=3, down='|', level='+', dash='-', space=' ')\n```\n\nOutput the map as a tree (in a folder structure format) into a text file.\n\n​\t\t*outfile*: The output file\n\n​\t\t*indent*: The number to indent each level\n\n​\t\t*down*: The character denoting a change in level\n\n​\t\t*level*: The character denoting a new parent\n\n​\t\t*dash*: The character bridging between the level and the node\n\n​\t\t*space*: The empty space between down characters\n\n```python\noutput_table(self, outfile, use_ticks=True, true_tick='X', false_tick='')\n```\n\nOutput the map as a table into a text file.\n\n​\t\t*outfile*: The output file\n\n​\t\t*use_ticks*: Replace True and False with given strings\n\n​\t\t*true_tick*: Tick to replace True\n\n​\t\t*false_tick*: Tick to replace False\n\n```python\noutput_csv(self, outfile, sep=',')\n```\n\nOutput the map as a table into a CSV file.\n\n​\t\t*outfile*: The output file\n\n​\t\t*sep*: The CSV separator\n\n```python\noutput_json(self, outfile, orient='split')\n```\n\nOutput the map as a table into a JSON file.\n\n​\t\t*outfile*: The output file\n\n​\t\t*orient*: The format for the JSON (used internally by a pandas DataFrame)\n\n\n\n## Other Functionality\n\nYou can also tap into your `CoggleECS` instance to get other data. Some examples:\n\n```python\nfrom coggle_ecs import CoggleECS\nmy_map = CoggleECS('path/to/your/map.mm')\nmy_map.parse()\n\n# Find a node by the beginning of its ID (returns first occurence)\nnode = my_map.find_by_id('1a2b3c')\n# Get all the Entities, Components, or Systems\nentities = my_map.get_entities()\ncomponents = my_map.get_components()\nsystems = my_map.get_systems()\n# Get the ECS pandas DataFrame\nmy_map.create_table(include_systems=True)\ndf = my_map.table\n```\n\n\n\n## Dependencies\n\nThis tool runs on Python 3 or later.\n\nIt also requires Pandas (the library, not the bear).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgvsv%2Fcoggle-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrgvsv%2Fcoggle-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgvsv%2Fcoggle-ecs/lists"}