This repository contains resources that augment or extend gvpr
, Graphviz's graph pattern recognizer.
gvpr
is an awk
-like language for modifying or processing graphs (expressed in the DOT language).
gvpr
was written by Emden Gansner and is part of Graphviz, an open source graph visualization and manipulation library created at AT&T Labs Research.
gvpr
can process one or more DOT files, applying user-specified actions for every element for that meets the conditions of the corresponding (and also user-specified) predicates.
For example, the gvpr
script:
N [color=="red"] { shape = "oval" }
will change the shape of every red node to oval
. To use this script, we can issue a command like:
gvpr -c "N [color==\"red\"] { shape = \"oval\" }" mygraph.gv
which will apply the given transformation to the graph defined in the file mygraph.gv
(and print the resulting graph to stdout). For more, you can download a PDF rendition of the gvpr
man page or check the documentation that was bundled with your Graphviz install.
-
gvpr-mode.el
, a simple emacs mode for editinggvpr
scripts. gvpr-mode is also available on the Marmalade repository. RunM-x package-install gvpr-mode
to install it (once Marmalade has been set up as described here.) -
common.gvpr
- A small library of utility functions for use withgvpr
. (A suite of automated tests for these functions can be found in thetest
directory, and run using the top-levelMakefile
by invokingmake test
.) -
gvprss - a pre-processor that implements a CSS-like stylesheet language on top of
gvpr
.gvprss
is implemented in JavaScript/Node.js and is published as an npm module. You can install it by runningnpm install -g gvprss
.
Well, gvpr-mode is just a quick-and-dirty syntax coloring mode I threw together because I was working on a number of gvpr
scripts and wanted to make it easier on myself.
The gvprss and the common set of gvpr functions are an outcome of and related to a book I've been writing called The Graphviz Cookbook. If you're working with gvpr
or Graphviz, please check that out (and tell your friends :) ).
gvpr-mode.el
, like emacs itself, is released under the GNU General Public License as described within the file.
Everything else is released under an MIT License, as described in license.txt
.