Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannyben/victor-cli
Command line for Victor, the Ruby SVG library
https://github.com/dannyben/victor-cli
gem ruby svg svg-builder
Last synced: 3 months ago
JSON representation
Command line for Victor, the Ruby SVG library
- Host: GitHub
- URL: https://github.com/dannyben/victor-cli
- Owner: DannyBen
- License: mit
- Created: 2020-04-26T20:34:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-25T11:17:50.000Z (4 months ago)
- Last Synced: 2024-10-06T05:19:25.896Z (3 months ago)
- Topics: gem, ruby, svg, svg-builder
- Language: Ruby
- Size: 155 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Victor CLI
[![Gem Version](https://badge.fury.io/rb/victor-cli.svg)](https://badge.fury.io/rb/victor-cli)
[![Build Status](https://github.com/DannyBen/victor-cli/workflows/Test/badge.svg)](https://github.com/DannyBen/victor-cli/actions?query=workflow%3ATest)
[![Maintainability](https://api.codeclimate.com/v1/badges/ab7a46b42d268e374ee1/maintainability)](https://codeclimate.com/github/DannyBen/victor-cli/maintainability)---
Command line interface for [Victor][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:
```shell
$ victor init example
```### `render`: Render Ruby to SVG
Given this Ruby code:
```ruby
# example.rb
setup width: 140, height: 100build do
circle cx: 50, cy: 50, r: 30, fill: "yellow"
end
```Run this command:
```shell
$ victor render example.rb --template minimal
```To generate this code:
```xml
```
### `convert`: Convert SVG to Ruby
Given this SVG file:
```xml
```
Run this command:
```shell
$ victor convert example.svg
```To generate this Ruby code:
```ruby
setup width: 140, height: 100build do
circle cx: 50, cy: 50, r: 30, fill: "yellow"
end```
---[victor]: https://github.com/DannyBen/victor