4 ms·
Is there a yaml or json dialect for general purposes graphviz? I see wireviz is defined using yaml and builds on graphviz. I’ve always wanted to do more with g
by rudolph9 6y ago
Is there a yaml or json dialect for general purposes graphviz?
I see wireviz is defined using yaml and builds on graphviz. I’ve always wanted to do more with graphviz but reluctant to use the [dot language][0] graphviz uses by default.
[0]: http://graphviz.org/doc/info/lang.html http://graphviz.org/doc/info/lang.html
- rudolph9 6y agoLooks like the The dot language originated in something called [Webdot][0] [0]: https://gitlab.com/graphviz/webdot https://gitlab.com/graphviz/webdot
- pjc50 6y agoIt's much older. https://linux.die.net/man/1/dot https://linux.die.net/man/1/dot references papers from 1989.
- nextaccountic 6y agoThere are stuff that converts yaml to dot, like https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf457052e2 https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf45705... but honestly just write dot, it's a simple format see also https://codefreezr.github.io/awesome-graphviz/ https://codefreezr.github.io/awesome-graphviz/
- rudolph9 6y agoYeah after doing more research I’m leaning towards just writing dot. It does look nice. Still, from a programmatic standpoint is there JSON equivalent? If wanted to build something like WireViz I would think that would be the most strait forward approach. I know there are lots of libs that compose it with mixes classes but I rather just build json objects...
- nextaccountic 6y agoI just found out that graphviz supports json as output. Check out https://graphviz.org/doc/info/output.html#d:json https://graphviz.org/doc/info/output.html#d:json (found this here https://stackoverflow.com/a/51443514 https://stackoverflow.com/a/51443514) I'm pretty sure that there's some tool out there to convert Graphviz's own json format back to dot Perhaps https://github.com/jsongraph/jgf-dot https://github.com/jsongraph/jgf-dot do it And if not, https://codefreezr.github.io/awesome-graphviz/#generators-and-translators https://codefreezr.github.io/awesome-graphviz/#generators-an... might contain something useful
- rudolph9 6y agoCool! Can you use the json as input?
- nextaccountic 6y agoI suppose https://github.com/jsongraph/jgf-dot https://github.com/jsongraph/jgf-dot does exactly that, but not exactly with Graphviz's own json syntax, but using this spec: https://github.com/jsongraph/json-graph-specification https://github.com/jsongraph/json-graph-specification