You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Andy Meneely 410a6b91d0 Sample for alpha transparency with TGC proofs 12 years ago
bin Adding Excel xlsx support and prefixed images 12 years ago
lib Fixing bugs in rangeify, adding todo 12 years ago
samples Sample for alpha transparency with TGC proofs 12 years ago
spec Color handling handed off to rcairo 12 years ago
.gitignore Changing default output folder to _output 12 years ago
.travis.yml Setting up travis 12 years ago
Gemfile Re-generating gem with bundler 12 years ago
LICENSE.txt Re-generating gem with bundler 12 years ago
README.md Using a more sane color definition in the simple example 12 years ago
Rakefile Still messing around 12 years ago
squib.gemspec Rearranging the gemspec 12 years ago

README.md

Squib Gem Version Build Status Dependency Status

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 supports complex text rendering, reading PNGs and SVGs, reading from ExcelX files, and shape drawing. Plus, you have the full power of Ruby behind you.

Check it out!

require 'squib'

Squib::Deck.new(width: 825, height: 1125, cards: 3) do
  background color: :white
  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 has some native dependencies, such as Cairo and Pango, and Nokogiri, which all require DevKit to compile C code. This is usually not painful, but on some setups can cause headaches. For Windows users, I highly recommend using [http://rubyinstaller.org/].

Development

Squib is currently in pre-release alpha, so the API is still maturing. If you are using Squib, however, I'd love to hear about it! Feel free to file a bug if you find any.

API

API docs to be written. The samples directory for in-depth examples.

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