Skip to content

Convert StateGo Data File (*.psgg) to Mermaid-js Flow Markdown text.

License

Notifications You must be signed in to change notification settings

NNNIC/psgg-mermaid-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psgg-mermaid-flow

Convert StateGo Data File (*.psgg) to Mermaid-js Flow Markdown text.

What it is.

This tool will convert Code Mix Visual Programming StateGo data file to Mermaid flow chart markdown text.

  • StateGo State Chart

  • Mermaid Flow Chart

How to use

Environment

Windows 10
Visual Studio 2019
StateGo (If you want to view StateGo Data File)

Build

Open "psgg2mermaid\psgg2mermaid.sln" using Visual Studio 2019.
Then, build it.

Usage

psgg2mermaid PSGG_FILE OUTPUT [-c]

PSGG_FILE : StateGo Data File (*.psgg)
OUTPUT : This tool output text file.
-c : (Option) Each node contains source code.

Test

  1. Execute the batch :
test.bat

This batch will convert from files in "testdata" folder to text files in "testdata_out"

  1. Open to Mermaid Live Editor

  2. Open a file in "testdata_out" folder then copy and paste to the editor.

You will see a flow.

Result

FizzBuzzControl.psgg (php) from https://github.com/NNNIC/psgg-php-sample

  • StateGo

  • Mermaid output

  • Mermaid output with code option

MazeControl.psgg (unity c#) from https://github.com/NNNIC/unity-maze-digging

  • StateGo

  • Mermaid output

TestControl.psgg (TyranoScript) from https://github.com/NNNIC/psgg-tyranoscript-sample

  • StateGo

  • Mermaid output

Test PHP Version

PHP version has been converted from C# project using Haxe.

Open the below url with file url.

https://statego.programanic.com/mermaid/disp.php?file=FILE_URL  

This server can accesss GitHub raw file.

Click the following links to see StateGo Flow with marmaid.

https://statego.programanic.com/mermaid/disp.php?file=https%3A%2F%2Fraw.githubusercontent.com%2FNNNIC%2Fpsgg-bash-sample%2Fmaster%2Fsample%2FTestControl.psgg
https://statego.programanic.com/mermaid/disp.php?file=https%3A%2F%2Fraw.githubusercontent.com%2FNNNIC%2Fpsgg-angular8-sample%2Fmaster%2Fsample%2Fmy-app%2Fsrc%2Fapp%2Fstate%2Fsrc%2FMainControl.psgg
https://statego.programanic.com/mermaid/disp.php?file=https%3A%2F%2Fraw.githubusercontent.com%2FNNNIC%2Fpsgg-javascript-15puzzle%2Fmaster%2Fm1%2Fjs%2Fdoc%2FMainControl.psgg
https://statego.programanic.com/mermaid/disp.php?file=https%3A%2F%2Fraw.githubusercontent.com%2FNNNIC%2Fpsgg-javascript-15puzzle%2Fmaster%2Fm1%2Fjs%2Fdoc%2FCreatePanelsControl.psgg

Special TEST for complicated samples.