Go to file
Andy Meneely f47ab6f4dd Range sample with some cool idioms 2014-07-17 13:10:17 -04:00
bin Adding Excel xlsx support and prefixed images 2014-07-16 15:32:48 -04:00
lib Removing hardcoded test data 2014-07-17 10:58:01 -04:00
samples Range sample with some cool idioms 2014-07-17 13:10:17 -04:00
spec Writing up some basic rspecs 2014-07-16 11:48:58 -04:00
.gitignore Changing default output folder to _output 2014-07-16 16:44:57 -04:00
.travis.yml Setting up travis 2014-07-16 16:54:01 -04:00
Gemfile Re-generating gem with bundler 2014-07-08 01:21:21 -04:00
LICENSE.txt Re-generating gem with bundler 2014-07-08 01:21:21 -04:00
README.md A basic README for now 2014-07-16 23:35:50 -04:00
Rakefile Still messing around 2014-07-10 21:53:47 -04:00
squib.gemspec Adding SVG support 2014-07-17 10:55:20 -04:00

README.md

Gem Version Build Status Dependency Status

Squib

Squib is a ruby DSL for prototyping card and board games. Think of it like nanDeck done "the Ruby way". Start with some basic commands and generate print-ready PNGs and PDFs.

Squib is currently pre-release alpha.

require 'squib'

Squib::Deck.new(width: 825, height: 1125, cards: 3) do
  background color: [1.0,1.0,1.0]
  data = xlsx file: 'sample.xlsx'

  rect x: 15, y: 15, width: 795, height: 1095, x_radius: 50, y_radius: 50

  text str: data['name'], x: 250, y: 55, font: 'Arial 54'
  text str: data['level'], x: 65, y: 40, font: 'Arial 72'

  png file: 'icon.png', x: 665, y: 30

  save format: :png
end

Installation

Add this line to your application's Gemfile:

gem 'squib'

And then execute:

$ bundle

Or install it yourself as:

$ gem install squib

Note: Squib is based on the cairo and pango extensions, which require at least Ruby 2.0

API

API docs to be written. See the samples directory.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/squib/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request