2 ms·
There are stuff that converts yaml to dot, like https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf457052e2 https://gist.github.com/rchrd2/247d1f1e86fa37494
by nextaccountic 6y ago
There 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