The current setup builds a binary called main, which is hard-coded to produce the SVG shown on the project's website. This patch instead exposes a binary called svgbob, which reads a bob file from stdin or from a file, and produces an SVG either on stdout or to a file. cargo install builds and exposes things binary. This fixes #3.
svgbob normally operates on stdin and stdout:
$ svgbob < examples/long.bob > long.svg
produces an SVG in long.svg similar to the one produced by the old main binary. svgbob also allows passing arguments instead:
This is also documented in the output of svgbob --help:
$ svgbob --help
svgbob 0.1.2
SvgBobRus is an ascii to svg converter
USAGE:
svgbob [OPTIONS] [input]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --output <output> where to write svg output [default: STDOUT]
ARGS:
<input> svgbob text file to parse [default: STDIN]
The version is automatically extracted from the crate version (which should probably be bumped after merging this).
The current setup builds a binary called
main
, which is hard-coded to produce the SVG shown on the project's website. This patch instead exposes a binary calledsvgbob
, which reads a bob file from stdin or from a file, and produces an SVG either on stdout or to a file.cargo install
builds and exposes things binary. This fixes #3.svgbob
normally operates on stdin and stdout:produces an SVG in
long.svg
similar to the one produced by the oldmain
binary.svgbob
also allows passing arguments instead:And you can mix and match:
This is also documented in the output of
svgbob --help
:The version is automatically extracted from the crate version (which should probably be bumped after merging this).