{"id":19635968,"url":"https://github.com/xiaoxiae/grafatko","last_synced_at":"2025-04-28T08:31:45.156Z","repository":{"id":57435717,"uuid":"180211079","full_name":"xiaoxiae/Grafatko","owner":"xiaoxiae","description":"An app for creating and visualizing graphs and graph-related algorithms.","archived":false,"fork":false,"pushed_at":"2022-02-11T20:18:57.000Z","size":593,"stargazers_count":27,"open_issues_count":14,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T03:39:51.627Z","etag":null,"topics":["computer-science","graph-algorithms","graph-theory","graph-visualizer","pyqt5","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaoxiae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-08T18:38:42.000Z","updated_at":"2024-10-21T01:01:41.000Z","dependencies_parsed_at":"2022-09-01T16:52:04.341Z","dependency_job_id":null,"html_url":"https://github.com/xiaoxiae/Grafatko","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2FGrafatko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2FGrafatko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2FGrafatko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2FGrafatko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoxiae","download_url":"https://codeload.github.com/xiaoxiae/Grafatko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224102437,"owners_count":17256170,"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":["computer-science","graph-algorithms","graph-theory","graph-visualizer","pyqt5","python"],"created_at":"2024-11-11T12:27:49.881Z","updated_at":"2024-11-11T12:27:50.930Z","avatar_url":"https://github.com/xiaoxiae.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grafátko [gɾafɑtko]\nAn app for creating and visualizing graphs and graph-related algorithms.\n\n![](https://raw.githubusercontent.com/xiaoxiae/Grafatko/master/example.png)\n\n## Running Grafátko\nFirst, install the app by running `pip install grafatko`.\nThen you can simply run the `grafatko` command from a terminal of your choice.\n\n---\n\nAnother way to run Grafátko (albeit a little more difficult) is to first clone the repository, go to the base directory and run the project as a Python module:\n\n```console\nxiaoxiae@thinkpad ~\u003e git clone https://github.com/xiaoxiae/Grafatko.git\nxiaoxiae@thinkpad ~\u003e cd Grafatko/\nxiaoxiae@thinkpad ~\u003e pip install -r requirements.txt\nxiaoxiae@thinkpad ~\u003e python -m grafatko.__init__\n```\n\n## Controls\n\n### Mouse\n- **right button** creates new nodes/vertices\n\t- **+ shift** doesn't deselect the currently selected nodes:\n- **left button** selects and drags nodes/vertices around the screen\n\t- if held, drags nodes along with the mouse\n\t- **+ shift** toggles selection on nodes/vertices\n\t\t- if held, moves the entire graph component\n- **middle button** pans\n- **mouse wheel** zooms\n\t- **+ shift** rotates nodes about the currently selected ones\n\n### Keyboard\n- **r** toggles 'tree mode' for smoother visualisation of trees\n\t- essentially applies special forces on the nodes to group them by distance from the currently selected node\n\t- only works if a single node is selected\n- **space** centers on the currently selected nodes\n- **delete** deletes the currently selected items\n\n### Other\n- `complement` -- makes the graph [complemented](https://en.wikipedia.org/wiki/Complement_graph)\n- `reorinet` -- changes the directions of the vertices of the graph\n\n## Visualizing algorithms\nThe app allows for visualising custom algorithms on the currently edited graph.\nExamples of valid programs can be found in the `examples/` folder.\n\nAfter creating a graph, you can go to `Algorithms -\u003e Run` and select the one you want to run on the graph.\nThe program then calls a function with the same name as the file, the only parameter being the `DrawableGraph` object to run the algorithm on.\n\nWhen the animation is running, you can use the `pause`, `resume` and `clear` to control it.\n\n## Importing/exporting graphs\nThe app uses a simple text-based format for importing and exporting graph.\nEach line of the file the format `n1 [direction] n2 [weight]`, where:\n- `n1` and `n2` are labels of the nodes forming the vertex, containing no whitespace characters\n- `[direction]` is used in directed graphs and is either `-\u003e` or `\u003c-`\n- `[weight]` is used in weighted graphs, denotes the weight of the vertex (either int or float)\n\nExamples of valid graphs can be found in the `examples/` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiae%2Fgrafatko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoxiae%2Fgrafatko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiae%2Fgrafatko/lists"}