A command-line wrapper for diagrams and gloss so we can leverage them outside haskell.
The goal is to provide a good subset of features from both libraries.
See mindra-clj for an example of a client library. It talks to mindra
via stdin
/stdout
using just formatted text.
Only the SVG backend is supported, and only a very small subset of diagrams
is exposed. See svg-parser for what is supported and how the commands are parsed into diagram(s).
See mindra-clj-diagrams for some examples.
Most of the gloss
features are supported. We should be able to use mindra
for creating both static pictures and animations (with event handling!). See gloss-parser for what is supported and how the commands are parsed into gloss picture(s).
See mindra-clj-gloss for some examples.
Install:
brew install rorokimdim/brew/mindra
Upgrade:
brew upgrade mindra
Uninstall:
brew uninstall mindra
Binaries are available at releases.
No pre-built binaries available at this time. We will need to build from source using stack install
or cabal install
.
Install stack, clone this repository and run the following in repository directory.
stack install
A. Start mindra command
mindra
It should print READY INIT
which means it is ready to receive the INIT
(initialization) command.
B. Initialize it for either diagrams or gloss
For diagrams
Configure for SVG of size 300px by 400px:
INIT Diagrams SVG 300 400
Note: Each command should be followed by a blank line.
For gloss
Configure for a window of size 500px by 500px, at position 10px, 10px on the screen, with the title "My Title", and white background color (red, green, blue, alpha values):
INIT Gloss
Window 500 500 10 10 "My Title"
Color 255 255 255 255
Note: Each command should be followed by a blank line.
C. Draw something
For diagrams
SVG Circle 100
For gloss
PICTURE Circle 100
Note: Each command should be followed by a blank line.
Hit ESC
to close window.