Analyze commands

GoGui allows to define an analyze command. The analyze command is sent to the Go program after each change on the board and its output is displayed graphically on the board.

The possible analyze commands are defined in the configuration file ~/.gogui/analyze-commands. There is one line per command in the format:

type/label/command[/section[/scale]]

Types

The command type can be
cboard
The answer of the command is a board of strings with color names. They will be displayed as background colors for the fields. Valid color names are blue, cyan, green, gray, magenta, pink, red, and yellow. Unknown names or the special string "" are ignored.
dboard
The answer of the command is a board of floating point numbers. They will be displayed as red (positive) and green (negative) polygons on the board. The numbers are expected to be between -1 and 1. Use the scale option, if they are not.
none
The output is not displayed.
plist
The answer of the command is a list of points. All points will be marked on the board.
sboard
The answer of the command is a board of strings. A string should not be longer than 3-4 characters to fit on a point on the board and may not contain white spaces. The special string "" is used for no string on a point.
string
The answer of the command is a text. If the text has only a single line, it will be displayed in the status line. If it has multiple lines, a window will popup.

Label

The label to use for the menu.

Command

The command to send to the Go program. The wildcard %m will be replaced by the color to move. If the command contains the wildcard %p, GoGui will ask the user to select point on the board.

Section

The answer to the command is searched first until a single line containing the section name followed by a colon is found.

Scale

If the type is dboard, the numbers are scaled by this factor.