Sign inSign up

bjtucker/jgfdot

By bjtucker

•Updated about 9 years ago

jgfdot command line utility from https://github.com/jsongraph/jgf-dot

Image
1

950

bjtucker/jgfdot repository overview

⁠jgf-dot

Convert a json graph⁠ into a dot file for use with Graphviz and other visualizers

⁠Command line

Install nodejs⁠ and run:

npm install -g jgf-dot

Then you can do the conversion using either:

cat graph.json | jgfdot > graph.dot
jgfdot graph.json > graph.dot
⁠jgfdot

Reads a json graph from STDIN or file_name and outputs the Dot file to STDOUT

⁠Docker

Install docker⁠ and run:

docker build -t jgfdot .
cat example/graph.json | docker run --rm --interactive jgfdot

⁠Javascript API

You can also use the programmatic API to convert json graph objects to dot file strings

var toDot = require("jgf-dot");

var graph = require("./graph.json");

var fs = require("fs");

var dot = toDot(graph);

fs.writeFileSync("graph.dot", "utf8");

NOTE: Currently the graph isn't being valdated before it gets parsed, but that feature is on the todo list.

Tag summary

Content type

Image

Digest

Size

254.5 MB

Last updated

about 9 years ago

docker pull bjtucker/jgfdot