# Command Line

Use the separate Victor Command Line Interface to create new Ruby scripts, and render SVGs.

# Target Image

In the example below, we are creating this ghost image.

# Usage Pattern

  1. Run victor init RUBY_FILENAME to create a sample Victor DSL file.
  2. Edit the file.
  3. Run victor render RUBY_FILENAME SVG_FILENAME to render your SVG.

# Code

# Render this by running:
# victor render "ghost.rb"

setup viewBox: '0 0 100 100'

build do
  circle cx: 50, cy: 50, r: 40, fill: 'yellow'
  rect x: 10, y: 50, width: 80, height: 50, fill: 'yellow'

  [25, 50].each do |x|
    circle cx: x, cy: 40, r: 8, fill: 'white'
  end

  path d: 'M11 100 l13 -15 l13 15 l13 -15 l13 15 l13 -15 l13 15 Z', fill: 'white'
end

See this example on GitHub

# See Also