Command line tool for converting Cytograph json graph files to png images with an optional Cytograph style json file which is applied to all of the graphs.
To install, use npm install Ringenberg/cytoscape2png
.
This should make ./node_modules/.bin/cytoscape2png
available,
otherwise use ./node_modules/cytoscape2png/index.js
in its place.
Please note that all of the .json files passed to this script need to be well formed JSON.
To generate a single image from a fully specified JSON file:
$ cytoscape2png path/to/graph.json
To generate all of the images for all of the specified graphs:
$ cytoscape2png path/to/images/graph*.json
will produce the corresponding images for each graph with the ".json" extention replaced by ".png"
To generate images with a common style:
$ cytoscape2png --style graph_style.json graph*.json
will generate all of the given graphs using the provided JSON style file as specified in http://js.cytoscape.org/#style - Plain JSON format.
-V, --version output the version number
-s, --style [value] A json file containing the Cytoscape style data to use for the images. (default: )
-w, --width <n> Sets the initial viewport width. (default: 500)
-h, --height <n> Sets the initial viewport height. (default: 500)
-T, --no-trim Do not trim image (default: true)
-h, --help output usage information