# Sgf Render ![Continuous integration](https://github.com/julianandrews/sgf-render/workflows/Continuous%20integration/badge.svg) ![Cho Chikun Elementary, Problem 45](demo/prob45.svg). CLI to generate diagrams of Go games from [SGF](https://www.red-bean.com/sgf/) format game records. Default SVG output is clean and well labeled for easy re-styling or modification. Supports [numbered moves](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/simple-numbered.svg), [markup](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/markup.svg), [kifu output](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/kifu.svg), and [several](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/minimalist-numbered.svg) [customizable](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/wacky.svg) [styles](https://raw.githubusercontent.com/julianandrews/sgf-render/master/demo/prob45-fancy.svg). ## Installation Check the [releases](https://github.com/julianandrews/sgf-render/releases) page on GitHub for pre-built binaries. Alternatively, you can also install the package from crates.io: ``` $ cargo install sgf-render ``` ## Building from Source Make sure you have `git` and `cargo` installed. Then: ``` $ git clone https://julianandrews/sgf-render $ cd sgf-render $ cargo build --release ``` ## Usage ``` Usage: sgf-render [OPTIONS] [FILE] [COMMAND] Commands: query Print a tree of the SGF's variations help Print this message or the help of the given subcommand(s) Arguments: [FILE] SGF file to read from [default: read from stdin] Options: -o, --outfile Output file [default: write to stdout] -f, --format Output format [default: svg] [possible values: svg, text, png] -g, --game-number Game number to display (for multi-game files) [default: 0] -v, --variation Variation number to display (use `query` command for numbers) [default: 0] -n, --node-number Node number in the variation to display [default: last] -w, --width Width of the output image in pixels [default: 800] -s, --shrink-wrap Draw only enough of the board to hold all the stones (with 1 space padding) -r, --range Range to draw as a pair of corners (e.g. 'cc-ff') --style