FormationBot renders square dance formations as pictures, to aid discussions of calling. It is open source, under the MIT license.
This version of FormationBot is based off of Alex Dehnert's original
FormationBot supports a mini-language to indicate formations. A person is represented by a single character, with optional prefixes to modify rendering.
Facing directions are indicated with:
<
, >
, ^
, and v
(or V
) represent a person facing in the appropriate directionnsew
can be used similarly (north, south, etc.) when more convenient (for example, mobile keyboards),
, @
, and *
represent a person with no facing direction+
draws a simple cross in place of a dancer.
represents an empty positionOther common prefixes include:
r
, g
, b
, c
, m
, and y
for red, green, blue, cyan, magenta and yellow, respectivelyo
or O
(lowercase or capital letter 'o') will make the dancer a circle-
or :
will give the dancer a dashed or dotted outline, respectively (for backwards compatibility, p
is supported as a synonym for -
)x
, X
, a digit, or '
(apostrophe) followed by any character will fill the box in appropriatelyFor complicated formations, one trick is that each line is centered. If that's not enough, you can also prefix u
, d
, l
, or R
(yes, case-sensitive) to shift a person up or down a half matrix spot.
+
for marking matrix spots without dancersX
, O
, or 0-9u@ d@
) are not cropped outIf you don't have it installed, install Rust.
Then, run cargo run
. This program reads from stdin until end-of-file, and
then renders the formation in SVG to the file out.svg
.
Follow the instructions in discord-bot/README.md