Command line for Victor, the Ruby SVG library
MIT License
Command line interface for Victor, the SVG Library.
$ gem install victor-cli
init
: Create a sample Ruby fileRun this command to create an initial sample file:
$ victor init example
render
: Render Ruby to SVGGiven this Ruby code:
# example.rb
setup width: 140, height: 100
build do
circle cx: 50, cy: 50, r: 30, fill: "yellow"
end
Run this command:
$ victor render example.rb --template minimal
To generate this code:
<svg width="140" height="100">
<circle cx="50" cy="50" r="30" fill="yellow"/>
</svg>
convert
: Convert SVG to RubyGiven this SVG file:
<!-- example.svg -->
<svg width="140" height="100">
<circle cx="50" cy="50" r="30" fill="yellow"/>
</svg>
Run this command:
$ victor convert example.svg
To generate this Ruby code:
setup width: 140, height: 100
build do
circle cx: 50, cy: 50, r: 30, fill: "yellow"
end