Skip to content

A python script which uses LaTeX to generate custom Cards Against Humanity cards for easy printing.

License

Notifications You must be signed in to change notification settings

juef17/CAHgenerator

Repository files navigation

CAHgenerator

A python script which uses LaTeX to generate custom Cards Against Humanity cards for easy printing.

Take a look at the Output folder for PDFs generated by the example input files in Input. The goal of this project is to be easily able to generate files of proper printing quality, ready to be printed and cut.

Why this over already existing online card generators?

  1. Since this is open source, the cards' size, text and appearance are entirely customizable.
  2. This doesn't need the Internet! Who knows, maybe you'll need this in some apocalyptic future.

Usage and requirements

Just run main.py. You'll need pdflatex, pdftk and Python 3 (Python 2 can be used with very few changes, if any). Tested on Linux and Windows 7, both 64 bit and with MikTeX.

Which set is included?

None! Well, actually, a handful of useless cards are included for testing purposes (see the Output and Input folders). You're free to create your own, or find already existing ones online.

What's the input format?

Simple text files: each line will be a new card. Use \\ for line breaks, ___ for an underlined blank space (on black cards). Some special LaTeX characters have to be escaped, such as $, \ and %.

Limitations

  • The original files downloadable from the official Cards Against Humanity website uses #231f20 rather than pure black. If printing in color is an option for you, it's probably a good idea to change the LaTeX code and PNG images accordingly.
  • The expected paper size is in letter size. Adjustements would have to be made in order to use A4, for example.
  • A lot of the LaTeX code could be refactored and reused with a better Python script. I've just been lazy. Sorry.

License and acknowledgements

This whole code was written by myself, and is GPL3 licensed (see LICENSE). The images in Input/Images are derived from the official (and free) packs on the official Cards Against Humanity website: therefore, they are under the Creative Commons BY-NC-SA 2.0 License.

About

A python script which uses LaTeX to generate custom Cards Against Humanity cards for easy printing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published