Skip to content

Generate different types of cards using the same ruby file #357

Answered by andymeneely
LouisDeconinck asked this question in Q&A
Discussion options

You must be logged in to vote

Is stitching them all into one PDF the only reason to do them in one deck? If so, you can do something like this:

  • Say you have Character Attack cards and Character Defend cards. Totally different layouts, but you want them all in the same PDF.
  • Make an attack.rb and defend.rb separately, they output to things like _output/char_attack_00.png and _output/char_defend_00.png
  • Make a new meta-deck called, say, pnp.rb
  • Use Dir['_output/char_*.png'] to get all of those files at once.
  • Then make a new deck with all of those cards in it, where the deck is essentially just a single png command.

So essentially the output of one Squib run becomes the input to another. I did something like this here: ht…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LouisDeconinck
Comment options

@LouisDeconinck
Comment options

Answer selected by LouisDeconinck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants