{"id":21960233,"url":"https://github.com/ewenquim/renpy-graphviz","last_synced_at":"2025-04-05T07:02:17.268Z","repository":{"id":39711846,"uuid":"342880580","full_name":"EwenQuim/renpy-graphviz","owner":"EwenQuim","description":"Draws a flowchart graph of any Visual Novel from Renpy .rpy files !","archived":false,"fork":false,"pushed_at":"2025-03-13T08:47:00.000Z","size":14724,"stargazers_count":146,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T17:18:56.515Z","etag":null,"topics":["branches","branching","flow","flowchart","graph","graphviz","labels","renpy"],"latest_commit_sha":null,"homepage":"https://ewenquim.github.io/renpy-graphviz/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EwenQuim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-27T14:50:01.000Z","updated_at":"2025-03-22T12:44:50.000Z","dependencies_parsed_at":"2024-06-28T12:47:17.732Z","dependency_job_id":"6eb67e46-72e6-4d3e-aeb3-d3c1a1a5dfbb","html_url":"https://github.com/EwenQuim/renpy-graphviz","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EwenQuim%2Frenpy-graphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EwenQuim%2Frenpy-graphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EwenQuim%2Frenpy-graphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EwenQuim%2Frenpy-graphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EwenQuim","download_url":"https://codeload.github.com/EwenQuim/renpy-graphviz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299829,"owners_count":20916190,"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":["branches","branching","flow","flowchart","graph","graphviz","labels","renpy"],"created_at":"2024-11-29T09:43:55.602Z","updated_at":"2025-04-05T07:02:17.247Z","avatar_url":"https://github.com/EwenQuim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./renpy-graphviz-logo.png\"  height=\"200\" alt=\"Ren'Py Graphviz\" /\u003e\n\u003c/p\u003e\n\n# Ren'Py graph visualizer - branches flowchart generator\n\n[![Go Reference](https://pkg.go.dev/badge/pkg.amethysts.studio/renpy-graphviz.svg)](https://pkg.go.dev/pkg.amethysts.studio/renpy-graphviz)\n[![Go Report Card](https://goreportcard.com/badge/pkg.amethysts.studio/renpy-graphviz)](https://goreportcard.com/report/pkg.amethysts.studio/renpy-graphviz)\n\n![GitHub Repo stars](https://img.shields.io/github/stars/ewenquim/renpy-graphviz?color=%23ff00ff\u0026label=If%20you%20like%20renpy-graphviz%2C%20leave%20me%20a%20star%21\u0026style=social)\n\nThis is a tool written in Go that allows you to **visualize the routes** of your Ren'Py story\n\n![Routes of the Question Extract](./data/the_question.jpg)\n_Routes of the Question, the classic Ren'Py example_\n\n## Table of Contents\n\n- [Ren'Py graph visualizer - branches flowchart generator](#renpy-graph-visualizer---branches-flowchart-generator)\n  - [Table of Contents](#table-of-contents)\n  - [Examples](#examples)\n  - [🔎 HOW TO USE?](#-how-to-use)\n    - [Online version - try online](#online-version---try-online)\n    - [Software version -install it on your computer](#software-version--install-it-on-your-computer)\n    - [Go library](#go-library)\n  - [🏷 Tags](#-tags)\n    - [BREAK](#break)\n    - [IGNORE](#ignore)\n    - [SKIPLINK](#skiplink)\n    - [FAKE\\_LABEL(a) \\\u0026 FAKE\\_JUMP(a, b)](#fake_labela--fake_jumpa-b)\n    - [INGAME\\_LABEL(i, a) \\\u0026 INGAME\\_JUMP(i, b)](#ingame_labeli-a--ingame_jumpi-b)\n    - [TITLE \\\u0026 GAMEOVER](#title--gameover)\n    - [SHAPE \\\u0026 COLOR](#shape--color)\n  - [Limitations](#limitations)\n  - [CONTRIBUTING](#contributing)\n  - [LICENSE](#license)\n\n## Examples\n\n![Doki Doki Litterature Club Extract](./data/DDLC_extract.png)\n_[Doki Doki Litterature Club](https://ddlc.moe/) will no longer have secrets for you!_\n\n![Coalescence Extract](./data/CXVL_extract.png)\n_An extract from my personal VN, [Coalescence](https://play.google.com/store/apps/details?id=com.coal). You can't imagine handling a heavy VN like this one without graphic tools... The labels are blurred due to the preview image_\n\n## 🔎 HOW TO USE?\n\n### Online version - try online\n\nYou can [test this tool in the browser](https://ewenquim.github.io/renpy-graphviz). If you want to get `.png` files, please download the software version. Note that this website will not be maintained and it is not guaranteed to represent the library fully.\n\n\u003chttps://ewenquim.github.io/renpy-graphviz\u003e\n\n### Software version -install it on your computer\n\nThe command line version is more powerful as you can add flags and a path, see the documentation by typing `renpy-graphviz -h`.\n\n- [**Download**](https://github.com/EwenQuim/renpy-graphviz/releases) the latest version\n- **Move** the program to your game folder\n- **Run it** from the command line `./renpy-graphviz` or by clicking on the icon in your file manager\n  - You might need to provide permissions, this program is not a virus. On Unix, run `chmod +x renpy-graphviz*`.\n- `renpy-graphviz.png` should appear, **enjoy**!\n\nUse the boolean flags only in `-flag=value` format, not in `-flag value ` format, e.g. use `./renpy-graphviz -open=false`.\n\n### Go library\n\n```cmd\ngo install pkg.amethysts.studio/renpy-graphviz@latest\n```\n\nIf you are a Go user and want to integrate this in a Go lib/program, it is possible. The `/parser` module is very powerful.\n\n## 🏷 Tags\n\nSince Ren'Py scripting isn't strict, therefore the script can't know what is going on in the `.rpy` file in some cases. So, this program uses a tag system to enforce some behaviors. For example;\n\n```renpy\nlabel chapter_1: #renpy-graphviz: TITLE\n```\n\nBefore tags, you must write `renpy-graphviz` in a comment to ensure there are no collisions with existing words in your VN. Here are the tags available:\n\n- BEHAVIOUR TAGS\n  - [BREAK](#break) breaks the current flow for linear labels, creating a new parallel\n  - [IGNORE](#ignore) ignores the current label. Jumps to this label will be drawn\n  - [SKIPLINK](#skiplink) avoids long arrows by creating shortcuts marked with an asterisk. These shortcuts can't have child nodes\n  - [FAKE_LABELS](#fake_labela--fake_jumpa-b) simulates labels and jumps, creating a new parallel\n  - [INGAME_LABELS](#ingame_labeli-a--ingame_jumpi-b) interacts with real labels and jumps, similar to fake labels\n- STYLE TAGS\n  - [TITLE](#title--gameover) is a style for chapters\n  - [GAMEOVER](#title--gameover) is a style for endings\n  - [SHAPE](#shape--color) sets a shape\n  - [COLOR](#shape--color) sets a color\n\n### BREAK\n\nCancels any \"guessed link\".\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eExpected\u003c/th\u003e\u003cth\u003ewith BREAK\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Break, Before](data/example-break-before.png)\u003c/td\u003e\u003ctd\u003e\n![Example image of Break, After](data/example-break-after.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\nlabel one:\n  \"blah blah\"\n\nlabel two:\n\"bla bla\"\n\n# renpy-graphviz: BREAK\n\nlabel three:\n\"the end\"\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### IGNORE\n\nIgnores the current line. If this is a jump to a label that isn't ignored, the label will still appear on the graph but not the arrow that should go towards it. Similarly, if this is a jump from a label that isn't ignored but the jump destination is, the arrow will not appear on the graph.\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eExpected\u003c/th\u003e\u003cth\u003eIGNORE\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Ignore, Before](data/example-ignore-before.png)\u003c/td\u003e\u003ctd\u003e\n![Example image of Ignore, After](data/example-ignore-after.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\nlabel one:\nlabel two: # renpy-graphviz: IGNORE\nlabel three:\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### SKIPLINK\n\nAvoids long arrows by creating another label with the same name. Beware, the label can't have any children and is marked by an asterisk to show it is a copy. Jumps will not be directed to this label if there is an original label displayed, if not, the jump is ignored.\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eExpected\u003c/th\u003e\u003cth\u003eSKIPLINK\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Skiplink, Before](data/example-skiplink-before.png)\u003c/td\u003e\u003ctd\u003e\n![Example image of Skiplink, After](data/example-skiplink-after.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\nlabel one:\n    if condition:\n        jump six # renpy-graphviz: SKIPLINK\n    else:\n        pass\n\nlabel two:\nlabel three:\nlabel four:\nlabel five:\nlabel six:\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### FAKE_LABEL(a) \u0026 FAKE_JUMP(a, b)\n\nCreates a node or an arrow in the graph without having to create a `label` in your Ren'Py script. It is disconnected from the normal flow, `label` and `jump` in your script.\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eFAKES\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Fakes](data/example-fakes.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\n# You can mix different tags on the same line\n# renpy-graphviz: FAKE_LABEL(a) TITLE\n# If b/c does not exists, it creates it\n# renpy-graphviz: FAKE_JUMP(b, c)\n\nlabel real_1:\n# There will be no 'indirect link' from `real_1` to `d`\n# renpy-graphviz: FAKE_LABEL(d)\n\n# Implicit jump from `real_one` to `real_two`\n# (normal behaviour as `d` is ignored by the normal flow)\nlabel real_2:\n\n# No jump from `real_two` to `a` or `d`\n# renpy-graphviz: FAKE_JUMP(a, d)\n\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### INGAME_LABEL(i, a) \u0026 INGAME_JUMP(i, b)\n\nSame as above but interacts with `label`, `call` and `jump` in your normal flow in the Ren'Py script.\nYou need to specify an indentation level.\n\n```renpy\n# renpy-graphviz: INGAME_JUMP(8, destination)\n```\n\nis the equivalent of:\n\n```renpy\n        jump destination\n```\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eINGAMES\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Label \u0026 Jump](data/example-ingames.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\n# renpy-graphviz: INGAME_LABEL(0, start)\n# renpy-graphviz: INGAME_JUMP(4, option_one)\n\n# Creates a link from `start` to `option_two` even\n# if there was a jump before -like normal jumps\n# renpy-graphviz: INGAME_JUMP(4, option_two)\n\nlabel option_one:\n    \"dialogue\"\n\n# should follow the previous label (implicit jump)\n# renpy-graphviz: INGAME_LABEL(0, indirect_label)\n\n# jumps from `indirect_label` to `option_two`\n    jump option_two\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### TITLE \u0026 GAMEOVER\n\nSets styles.\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eTITLE / GAMEOVER\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Title](data/example-title-gameover.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\nlabel routeone :  # renpy-graphviz: TITlE\n    d \"Hello World!\"\n    if condition:\n        jump bad_ending\n\nlabel routeAlternative:\n    d \"Normal bubble\"\n    jump good_ending\n\n\nlabel bad_ending: # renpy-graphviz: GAMEOVER\n    d \"Bad ending\"\n    return\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### SHAPE \u0026 COLOR\n\nYou can set yourself a custom color or shape for a label.\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eSHAPE and/or COLOR\u003c/th\u003e\u003cth\u003escript.rpy\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\n\n![Example image of Shape Color](data/example-shape-color.png)\u003c/td\u003e\u003ctd\u003e\n\n```renpy\nlabel first: # renpy-graphviz: SHAPE(rect) COLOR(red)\n    jump second # renpy-graphviz: SHAPE(septagon) COLOR(#ffdd67)\n```\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nSome examples of shapes and colors can be found here.\n\n| Shapes    | Colors |\n| --------- | ------ |\n| Rectangle | Red    |\n| Septagon  | Blue   |\n| Egg       | Purple |\n| Diamond   | White  |\n\n`graph.go` file also supports line styling, font size and line thickness. Default values can also be changed inside the `graph.go` file.\n\n## Limitations\n\nThis requires your VN to be structured in a certain way, so this may not be perfect for you. Feel free to raise an issue [here](https://github.com/EwenQuim/renpy-graphviz/issues), or to change your VN structure, by adding tags manually.\n\n**Your contribution to the project** is appreciated!\n\n## CONTRIBUTING\n\nSee the [CONTRIBUTING.md](./CONTRIBUTING.md) file\n\n## LICENSE\n\nThis program is free and under the [AGPLv3 license](https://www.gnu.org/licenses/agpl-3.0.en.html).\n\nBeware, if you use this program, you must **credit it somewhere on your game**.\n\n\u003e Used Renpy Graph Vizualiser from EwenQuim\n\nEnjoy! ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewenquim%2Frenpy-graphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewenquim%2Frenpy-graphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewenquim%2Frenpy-graphviz/lists"}