From 07f3c3c14aa38a0592225935e897f3a53f6182cf Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Fri, 21 Jul 2017 15:06:05 -0400 Subject: [PATCH] sprues: samples for a custom sprue --- samples/sprues/_mints.rb | 11 ++++ samples/sprues/my_sprues/us_letter_mints.yml | 58 ++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 samples/sprues/_mints.rb create mode 100644 samples/sprues/my_sprues/us_letter_mints.yml diff --git a/samples/sprues/_mints.rb b/samples/sprues/_mints.rb new file mode 100644 index 0000000..cc0493c --- /dev/null +++ b/samples/sprues/_mints.rb @@ -0,0 +1,11 @@ +require 'squib' + +# An example deck that uses "mint" sized cards (e.g. Altoids). +# These cards are pretty small but comfortably fit in a mint tin + +Squib::Deck.new(cards: 21, width: '54.0mm', height: '68.0mm') do + background color: :gray + rect + text str: (1..21).to_a + save_pdf sprue: 'my_sprues/us_letter_mints.yml' +end diff --git a/samples/sprues/my_sprues/us_letter_mints.yml b/samples/sprues/my_sprues/us_letter_mints.yml new file mode 100644 index 0000000..36a5061 --- /dev/null +++ b/samples/sprues/my_sprues/us_letter_mints.yml @@ -0,0 +1,58 @@ +--- +sheet_width: 279.4mm +sheet_height: 215.89999999999998mm +card_width: 54.0mm +card_height: 68.0mm +cards: +- x: 4.699999999999989mm + y: 4.0mm +- x: 58.69999999999999mm + y: 4.0mm +- x: 112.69999999999999mm + y: 4.0mm +- x: 166.7mm + y: 4.0mm +- x: 220.7mm + y: 4.0mm +- x: 4.699999999999989mm + y: 72.0mm +- x: 58.69999999999999mm + y: 72.0mm +- x: 112.69999999999999mm + y: 72.0mm +- x: 166.7mm + y: 72.0mm +- x: 220.7mm + y: 72.0mm +- x: 4.699999999999989mm + y: 140.0mm +- x: 58.69999999999999mm + y: 140.0mm +- x: 112.69999999999999mm + y: 140.0mm +- x: 166.7mm + y: 140.0mm +- x: 220.7mm + y: 140.0mm +crop_line: + lines: + - type: :vertical + position: 4.699999999999989mm + - type: :vertical + position: 58.69999999999999mm + - type: :vertical + position: 112.69999999999999mm + - type: :vertical + position: 166.7mm + - type: :vertical + position: 220.7mm + - type: :vertical + position: 274.7mm + - type: :horizontal + position: 4.0mm + - type: :horizontal + position: 72.0mm + - type: :horizontal + position: 140.0mm + - type: :horizontal + position: 208.0mm