Skip to content

NicolasPL64/CAH_generator

 
 

Repository files navigation

Cards Against Humanity card generator

This program generates a ready-to-print PDF with cards for the game Cards Against Humanity given plain text files (.txt).

New features and improvements from the original branch

  • 3 different variations (examples down below)
  • Support for special characters
  • Support for HTML tags (like <i> or <br/>)
  • Improved the line-splitting method
  • Lots of bugs fixed!

Usage

File(s) with sentences must be placed inside Input/BlackCards and Input/WhiteCards respectively (one line = one card). Multiple files can be placed in their respective folders, thus allowing for more organization.

Install program dependencies:

$ pip3 install -r requirements.txt 

Choose between any of the three variations, run the corresponding script and see the result in Output/:

$ ./[3] centered 4x5.py

Example

Given the files Input/BlackCards/A testing.txt, Input/BlackCards/black.txt, Input/WhiteCards/A testing.txt and Input/WhiteCards/white.txt the output folder will contain a PDF like this:

Variation 1: 1

Variation 2: 2

Variation 3: 3

Why?

I didn't want to waste 10 minutes writing cards into a PDF then I thought that it would be a great idea to waste one day writing a program to make it automatically. - @Rubenmp

And I wanted to fix the original code to satisfy my needs as I'll be using this script in the future to print some evil cards to play with my friends! (Also I wanted to learn python, this was my first time lol) - @NicolasPL64

License

Creative Commons BY-NC-SA 2.0