Playtest is a Ruby system for generating a PDF suitable for playtesting and prototyping physical card games.
- Pull playtest down from GitHub
bundle installto install the gems we depend on
ruby playtest.rbto start the script and make sure it completes successfully
A cards.yml file is used to store the contents of the cards you wish to create. You can specify the quantity in addition to information like the card name, rules text and cost. If you want to add additional properties to the cards.yml file, that's possible, but you'll need to modify the code so that it renders where and how you want it to.
After running, exported files are saved in
export/. You may wish to copy the files generated here elsewhere so they do not get rewritten.
We've recently added some command line options to give you greater control over the cards you generate:
-v | --verbose : display console output while running
-c CARDYAML | --cards CARDYAML : defaults to "import/cards.yml", the YAML file it will use for reference
-o OUTPUT | --output OUTPUT : the file to export to. Defaults to "export/rendered_XXXXXX.ext" where XXXX is the microtime and ext is the output extension (defaults to PDF)
-s CSSFILE | --stylesheet CSSFILE : The css file to use when doing HTML output, optional. Defaults to "import/default.css"
Super basic: ./playtest.rb
Super basic, verbose: ./playtest.rb -v
Custom YAML input: ./playtest.rb -c "import/cards.yml"
HTML output: ./playtest.rb -o "export/foo.html"
Super tweaked: ./playtest.rb -v -c "/path/to/my/cards.yml" -o "/path/to/my/export/new_cards.pdf"
To add new code please:
- Fork playtest
- Write your code
- Make sure the tests are pssing using rspec
- Submit a pull request
To report an issue or request a feature, please use our handy issue tracker
My thanks to @diachini and @armahillo for being contributors to the project.