Parses the Graphviz DOT language in golang
Go Other
Latest commit 01fdca2 Jul 29, 2017 @awalterschulze regenerate gocc
Permalink
Failed to load latest commit information.
ast Attributes and Errors (#25) Apr 10, 2017
internal regenerate gocc Jul 29, 2017
testdata parser: Fix non-ASCII test cases. Jul 31, 2016
.travis.yml upgrade go version Apr 10, 2017
AUTHORS updated travis to regenerate and check diff Oct 1, 2016
CONTRIBUTORS Add Nathan Kitchen to contributors (#31) May 30, 2017
LICENSE copyright adjustment Aug 10, 2016
Makefile zip generated parser tables Apr 10, 2017
Readme.md Update Readme.md Apr 11, 2017
analyse.go Test for issue #32 (#33) Jun 10, 2017
analysewrite_test.go Attributes and Errors (#25) Apr 10, 2017
attr.go Attributes and Errors (#25) Apr 10, 2017
attrs.go Attributes and Errors (#25) Apr 10, 2017
bug_test.go Attributes and Errors (#25) Apr 10, 2017
catch.go Attributes and Errors (#25) Apr 10, 2017
dot.bnf removed todos from bnf and added them to github issues May 28, 2017
edges.go Attributes and Errors (#25) Apr 10, 2017
edges_test.go Attributes and Errors (#25) Apr 10, 2017
escape.go Attributes and Errors (#25) Apr 10, 2017
escape_test.go Attributes and Errors (#25) Apr 10, 2017
example_test.go Attributes and Errors (#25) Apr 10, 2017
gographviz.go Attributes and Errors (#25) Apr 10, 2017
graph.go Attributes and Errors (#25) Apr 10, 2017
install-godeps.sh Attributes and Errors (#25) Apr 10, 2017
issue21_test.go Attributes and Errors (#25) Apr 10, 2017
issue26_test.go fix for issue 26 May 28, 2017
issue32_test.go Test for issue #32 (#33) Jun 10, 2017
nodes.go Test for issue #32 (#33) Jun 10, 2017
relations.go Attributes and Errors (#25) Apr 10, 2017
subgraphs.go Attributes and Errors (#25) Apr 10, 2017
write.go Attributes and Errors (#25) Apr 10, 2017

Readme.md

Parses the Graphviz DOT language and creates an interface, in golang, with which to easily create new and manipulate existing graphs which can be written back to the DOT format.

This parser has been created using gocc.

Example (Parse and Edit)

graphAst, _ := gographviz.ParseString(`digraph G {}`)
graph := gographviz.NewGraph()
if err := gographviz.Analyse(graphAst, graph); err != nil {
    panic(err)
}
graph.AddNode("G", "a", nil)
graph.AddNode("G", "b", nil)
graph.AddEdge("a", "b", true, nil)
output := graph.String()

Documentation

The godoc includes some more examples.

Installation

go get github.com/awalterschulze/gographviz

Tests

Build Status

Users

  • aptly - Debian repository management tool
  • gorgonai - A Library that helps facilitate machine learning in Go

Mentions

Using Golang and GraphViz to Visualize Complex Grails Applications