sgfinfo
Steps toward a command-line query tool for SGF Go game files.
This is still rudimentary.
to fetch:
go get github.com/dhodges/sgfinfo
go get github.com/stretchr/testify
to build:
$ go build
to test:
$ cd tests
$ go test
usage:
$ sgfinfo <sgf_file>
...which will dump details, in json, about the given game.
Parsing still needs to flesh out some of the darker corners of the SGF spec, but most use-cases are covered including zip-file archives, multiple games per file and gametree variations.
The parser is based on an excellent talk from Rob Pike: "Lexical Scanning in Go"
Resources