https://github.com/mmitch/choicescript-graphviz
visualize ChoiceScript files as graphs using graphviz/dot
https://github.com/mmitch/choicescript-graphviz
choicescript graph graphviz graphviz-dot tree visualisation visualization
Last synced: 8 months ago
JSON representation
visualize ChoiceScript files as graphs using graphviz/dot
- Host: GitHub
- URL: https://github.com/mmitch/choicescript-graphviz
- Owner: mmitch
- Created: 2017-10-29T18:23:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-01T11:51:28.000Z (over 3 years ago)
- Last Synced: 2024-12-31T19:38:04.967Z (10 months ago)
- Topics: choicescript, graph, graphviz, graphviz-dot, tree, visualisation, visualization
- Language: Java
- Size: 50.8 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
convert ChoiceScript files to GraphViz trees
============================================
[](https://github.com/mmitch/choicescript-graphviz/actions?query=workflow%3A%22Java+CI%22)
requirement
-----------
- java
- gradle (`sudo apt-get install gradle`)
installation
------------
```
$ git clone https://github.com/mmitch/choicescript-graphviz.git
$ cd choicescript-graphviz
$ make
```
usage
-----
`java -cp /path/to/choicescript-graphviz/build/classes/java/main Main /path/to/choicescript/scene.txt > output.dot`
**Note:** The output can be viewed with `xdot` or other graphviz software.
examples
--------
1. [example ChoiceScript file](example/example-4-spaces.txt)
2. [converted to dot](example/example.dot)
3. [converted to SVG](example/example.dot.svg)
project status
--------------
- spontaneous idea
- had some fun coding
- works so far
Not all ChoiceScript parameters are implemented yet. I don't know if
they ever will be.
Note that text nodes are shortened to *T[character_count]*. The first
part of the text will be displayed as a tooltip.
todos
-----
- implement missing commands
- *comment
- *else
- *elsif
- *gosub
- *goto_scene
- *hide_reuse
- *input_text
- *return
- *temp
- *if between *choice and #selection
- show *disable_reuse on #selection graph edge
- show *selectable_if on #selection graph edge
resources
---------
- [ChoiceScript introduction](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)
- [ChoiceScript sources](https://github.com/dfabulich/choicescript)