Project

victor-cli

0.0
A long-lived project that still receives updates
CLI for Victor, the SVG Library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 1.0
~> 1.10
~> 0.12
~> 0.4
~> 1.0
 Project Readme

Victor CLI

Gem Version Build Status Maintainability


Command line interface for Victor, the SVG Library.


Installation

$ gem install victor-cli

Usage

init: Create a sample Ruby file

Run this command to create an initial sample file:

$ victor init example

render: Render Ruby to SVG

Given 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 Ruby

Given 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