Lots of examples, some better checking, lots of documentation, sanity tests. Lots of little stuff.dev
@ -0,0 +1,25 @@ |
|||||||
|
--- |
||||||
|
sheet_width: 8.5in |
||||||
|
sheet_height: 11in |
||||||
|
card_width: 2.5in |
||||||
|
card_height: 3.5in |
||||||
|
position_reference: :center |
||||||
|
cards: |
||||||
|
- x: 1.75in |
||||||
|
y: 2.000in |
||||||
|
- x: 4.250in |
||||||
|
y: 2.000in |
||||||
|
- x: 6.750in |
||||||
|
y: 2.000in |
||||||
|
- x: 1.75in |
||||||
|
y: 5.500in |
||||||
|
- x: 4.250in |
||||||
|
y: 5.500in |
||||||
|
- x: 6.750in |
||||||
|
y: 5.500in |
||||||
|
- x: 1.75in |
||||||
|
y: 9.000in |
||||||
|
- x: 4.250in |
||||||
|
y: 9.000in |
||||||
|
- x: 6.750in |
||||||
|
y: 9.000in |
||||||
@ -0,0 +1,52 @@ |
|||||||
|
--- |
||||||
|
sheet_width: 11in |
||||||
|
sheet_height: 8.5in |
||||||
|
card_width: 2.5in |
||||||
|
card_height: 3.5in |
||||||
|
cards: |
||||||
|
- x: 0.35in |
||||||
|
y: 0.225in |
||||||
|
- x: 0.35in |
||||||
|
y: 4.800in |
||||||
|
rotate: :turnaround |
||||||
|
- x: 2.95in |
||||||
|
y: 0.225in |
||||||
|
- x: 2.95in |
||||||
|
y: 4.800in |
||||||
|
rotate: :turnaround |
||||||
|
- x: 5.55in |
||||||
|
y: 0.225in |
||||||
|
- x: 5.55in |
||||||
|
y: 4.800in |
||||||
|
rotate: :turnaround |
||||||
|
- x: 8.15in |
||||||
|
y: 0.225in |
||||||
|
- x: 8.15in |
||||||
|
y: 4.800in |
||||||
|
rotate: :turnaround |
||||||
|
crop_line: |
||||||
|
lines: |
||||||
|
- type: :vertical |
||||||
|
position: 0.35in |
||||||
|
- type: :vertical |
||||||
|
position: 2.85in |
||||||
|
- type: :vertical |
||||||
|
position: 2.95in |
||||||
|
- type: :vertical |
||||||
|
position: 5.45in |
||||||
|
- type: :vertical |
||||||
|
position: 5.55in |
||||||
|
- type: :vertical |
||||||
|
position: 8.05in |
||||||
|
- type: :vertical |
||||||
|
position: 8.15in |
||||||
|
- type: :vertical |
||||||
|
position: 10.65in |
||||||
|
- type: :horizontal |
||||||
|
position: 0.225in |
||||||
|
- type: :horizontal |
||||||
|
position: 3.725in |
||||||
|
- type: :horizontal |
||||||
|
position: 3.825in |
||||||
|
- type: :horizontal |
||||||
|
position: 7.325in |
||||||
@ -1,18 +1,19 @@ |
|||||||
require 'squib' |
require 'squib' |
||||||
|
|
||||||
Squib::Deck.new(cards: 8) do |
Squib::Deck.new(width: '50mm', height: '70mm', cards: 9) do |
||||||
background color: :white |
background color: :white |
||||||
rect stroke_width: 5, stroke_dash: '7 7' |
rect stroke_width: 5, stroke_color: :red |
||||||
text str: %w(First Second Third Fourth Fifth Sixth Seventh Eighth), |
text str: (0..9).map{ |i| "Card! #{i}\n50x77mm" }, |
||||||
font: 'Sans 96', align: :center, valign: :middle, |
font: 'Sans 96', align: :center, valign: :middle, |
||||||
height: :deck, width: :deck |
height: :deck, width: :deck |
||||||
|
|
||||||
%w( |
%w( |
||||||
a4_euro_card.yml |
|
||||||
a4_poker_card_8up.yml |
a4_poker_card_8up.yml |
||||||
|
a4_euro_card.yml |
||||||
a4_poker_card_9up.yml |
a4_poker_card_9up.yml |
||||||
a4_usa_card.yml |
a4_usa_card.yml |
||||||
|
letter_poker_card_9up.yml |
||||||
).each do |builtin| |
).each do |builtin| |
||||||
save_sheet sprue: builtin, prefix: "sprue_#{builtin}_", dir: '.' |
save_sheet sprue: builtin, prefix: "sprue_#{builtin}_" |
||||||
end |
end |
||||||
end |
end |
||||||
|
|||||||
@ -1,11 +1,27 @@ |
|||||||
require 'squib' |
require 'squib' |
||||||
|
|
||||||
Squib::Deck.new(width: '63mm', height: '88mm', cards: 8) do |
# Note that this sample has no bleed - you might want to have bleed |
||||||
rect fill_color: :gray |
# but tighter than usual: 0.1 instead of 0.125in since this sprue is |
||||||
text( |
# crowded horizontally on US letter |
||||||
str: %w[Front_1 Front_2 Front_3 Front_4 Back_1 Back_2 Back_3 Back_4], |
Squib::Deck.new(width: '2.5in', height: '3.5in', cards: 8) do |
||||||
x: '3mm', y: '3mm' |
background color: :white |
||||||
) |
rect stroke_width: 5, stroke_color: :red |
||||||
save_pdf file: 'fold_sheet.pdf', |
# Note that we are interleaving strings |
||||||
sprue: 'my_sprues/fold_sheet.yml' |
# This could be used as a secondary Squib script that loads |
||||||
|
# Squib-generated individual images |
||||||
|
strings = [ |
||||||
|
"Front 1", |
||||||
|
"Back 1", |
||||||
|
"Front 2", |
||||||
|
"Back 2", |
||||||
|
"Front 3", |
||||||
|
"Back 3", |
||||||
|
"Front 4", |
||||||
|
"Back 4", |
||||||
|
] |
||||||
|
|
||||||
|
text str: strings,font: 'Sans 96', align: :center, valign: :middle, |
||||||
|
height: :deck, width: :deck |
||||||
|
save_sheet prefix: 'foldable_', |
||||||
|
sprue: 'letter_poker_foldable_8up.yml' |
||||||
end |
end |
||||||
|
|||||||
@ -0,0 +1,11 @@ |
|||||||
|
require 'squib' |
||||||
|
|
||||||
|
Squib::Deck.new(cards: 9) do |
||||||
|
background color: :white |
||||||
|
rect stroke_width: 5, stroke_color: :red |
||||||
|
text str: (0..9).map{ |i| "Card #{i}\n2.5x3.5in" }, |
||||||
|
font: 'Sans 96', align: :center, valign: :middle, |
||||||
|
height: :deck, width: :deck |
||||||
|
save_sheet sprue: 'letter_poker_card_9up.yml', |
||||||
|
prefix: "sprue_example_" |
||||||
|
end |
||||||
@ -1,9 +0,0 @@ |
|||||||
require 'squib' |
|
||||||
|
|
||||||
Squib::Deck.new(width: '63mm', height: '88mm', cards: 9) do |
|
||||||
text( |
|
||||||
str: %w[One Two Three Four Five Six Seven Eight Nine], x: '3mm', y: '3mm' |
|
||||||
) |
|
||||||
save_pdf file: 'use_package_tmpl.pdf', |
|
||||||
sprue: 'a4_poker_card_9up.yml' |
|
||||||
end |
|
||||||
|
After Width: | Height: | Size: 59 KiB |
@ -1,57 +0,0 @@ |
|||||||
--- |
|
||||||
sheet_width: 297mm |
|
||||||
sheet_height: 210mm |
|
||||||
card_width: 63.0mm |
|
||||||
card_height: 88.0mm |
|
||||||
cards: |
|
||||||
- x: 16.5mm |
|
||||||
y: 13.0mm |
|
||||||
- x: 83.5mm |
|
||||||
y: 13.0mm |
|
||||||
- x: 150.5mm |
|
||||||
y: 13.0mm |
|
||||||
- x: 217.5mm |
|
||||||
y: 13.0mm |
|
||||||
- x: 16.5mm |
|
||||||
y: 109.0mm |
|
||||||
rotate: :turnaround |
|
||||||
- x: 83.5mm |
|
||||||
y: 109.0mm |
|
||||||
rotate: :turnaround |
|
||||||
- x: 150.5mm |
|
||||||
y: 109.0mm |
|
||||||
rotate: :turnaround |
|
||||||
- x: 217.5mm |
|
||||||
y: 109.0mm |
|
||||||
rotate: :turnaround |
|
||||||
crop_line: |
|
||||||
lines: |
|
||||||
- type: :vertical |
|
||||||
position: 16.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 79.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 83.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 146.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 150.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 213.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 217.5mm |
|
||||||
- type: :vertical |
|
||||||
position: 280.5mm |
|
||||||
- type: :horizontal |
|
||||||
position: 13.0mm |
|
||||||
- type: :horizontal |
|
||||||
position: 101.0mm |
|
||||||
- type: :horizontal |
|
||||||
position: 109.0mm |
|
||||||
- type: :horizontal |
|
||||||
position: 197.0mm |
|
||||||
- type: :horizontal |
|
||||||
position: 105.0mm |
|
||||||
style: :dashed |
|
||||||
color: :red |
|
||||||
overlay_on_cards: true |
|
||||||
@ -1,42 +0,0 @@ |
|||||||
--- |
|
||||||
sheet_width: 8.5in |
|
||||||
sheet_height: 11in |
|
||||||
card_width: 2.5in |
|
||||||
card_height: 3.5in |
|
||||||
cards: |
|
||||||
- x: 0.5in |
|
||||||
y: 0.125in |
|
||||||
- x: 3.0in |
|
||||||
y: 0.125in |
|
||||||
- x: 5.5in |
|
||||||
y: 0.125in |
|
||||||
- x: 0.5in |
|
||||||
y: 3.625in |
|
||||||
- x: 3.0in |
|
||||||
y: 3.625in |
|
||||||
- x: 5.5in |
|
||||||
y: 3.625in |
|
||||||
- x: 0.5in |
|
||||||
y: 7.125in |
|
||||||
- x: 3.0in |
|
||||||
y: 7.125in |
|
||||||
- x: 5.5in |
|
||||||
y: 7.125in |
|
||||||
crop_line: |
|
||||||
lines: |
|
||||||
- type: :vertical |
|
||||||
position: 0.5in |
|
||||||
- type: :vertical |
|
||||||
position: 3.0in |
|
||||||
- type: :vertical |
|
||||||
position: 5.5in |
|
||||||
- type: :vertical |
|
||||||
position: 8.0in |
|
||||||
- type: :horizontal |
|
||||||
position: 0.125in |
|
||||||
- type: :horizontal |
|
||||||
position: 3.625in |
|
||||||
- type: :horizontal |
|
||||||
position: 7.125in |
|
||||||
- type: :horizontal |
|
||||||
position: 10.625in |
|
||||||
|
After Width: | Height: | Size: 254 KiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 74 KiB |