All Projects → jhauberg → cards.py

jhauberg / cards.py

Licence: MIT License
Generate Print-and-Play cards for your board games

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to cards.py

presskit.html
Re-implementation of presskit() as a static site generator
Stars: ✭ 250 (+1462.5%)
Mutual labels:  static-site-generator
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (+262.5%)
Mutual labels:  static-site-generator
permalinks
A Metalsmith plugin for permalinks.
Stars: ✭ 61 (+281.25%)
Mutual labels:  static-site-generator
create-harold-app
Static blog/site generator
Stars: ✭ 33 (+106.25%)
Mutual labels:  static-site-generator
cyrax
Static site generator
Stars: ✭ 41 (+156.25%)
Mutual labels:  static-site-generator
nuxt-starter-netlify-cms
Example nuxt + netlify cms project. Nuxt port of Gatsby starter app.
Stars: ✭ 13 (-18.75%)
Mutual labels:  static-site-generator
forty
Forty theme - Hugo theme ported from HTML5UP origrinal theme called Forty.
Stars: ✭ 116 (+625%)
Mutual labels:  static-site-generator
snipcart-hugo-integration
Hugo Website Tutorial with a Live Static E-Commerce Example
Stars: ✭ 38 (+137.5%)
Mutual labels:  static-site-generator
hakyll-bootstrap
Basic Hakyll + Bootstrap site
Stars: ✭ 26 (+62.5%)
Mutual labels:  static-site-generator
pagd
Static site generator in python.
Stars: ✭ 57 (+256.25%)
Mutual labels:  static-site-generator
picidaejs
🐦Picidae is a document generator which has gentle experience.
Stars: ✭ 24 (+50%)
Mutual labels:  static-site-generator
PkgPage.jl
Create a beautiful landing page for your package in less than 10 minutes.
Stars: ✭ 98 (+512.5%)
Mutual labels:  static-site-generator
nocms
"NO, You don't need a CMS"
Stars: ✭ 13 (-18.75%)
Mutual labels:  static-site-generator
slaytheweb
Slay the Web is a singleplayer, deck builder, roguelike card crawl game for the web based on Slay the Spire
Stars: ✭ 57 (+256.25%)
Mutual labels:  card-game
hugo-gulp-template
Enhanced template for Hugo projects
Stars: ✭ 28 (+75%)
Mutual labels:  static-site-generator
ftd
🚧 (Alpha stage software) FTD: Programming Language For Prose 🚧
Stars: ✭ 18 (+12.5%)
Mutual labels:  static-site-generator
reslate
Beautiful static documentation for your API
Stars: ✭ 98 (+512.5%)
Mutual labels:  static-site-generator
cards-over-lan
A Cards Against Humanity clone for LAN play. Works on desktop and mobile. Supports custom cards in multiple languages.
Stars: ✭ 45 (+181.25%)
Mutual labels:  card-game
kun
a small static site generator
Stars: ✭ 16 (+0%)
Mutual labels:  static-site-generator
uno
UNO - Card Game with Java
Stars: ✭ 70 (+337.5%)
Mutual labels:  card-game

cards.py

cards.py

A tool for generating pages full of cards- ready to print.

Feed it with a CSV file containing all your card data and it will output an HTML file with pages of your cards laid out for easy and efficient cutting. It's like a static site generator, but for cards!

Use the print function of your browser to save the pages to a PDF or to print them immediately.

Installation

Install straight from the source:

$ python3 setup.py install
Uninstalling

If you want to uninstall cards.py and make sure that you get rid of everything, you can run the installation again using the additional --record argument to save a list of all installed files:

$ python3 setup.py install --record installed_files.txt

You can then go through all listed files and manually delete each one.

Usage

When installed, you can run cards.py on the command line:

$ cards make cards.csv
It doesn't work

There's a few things that could go wrong during an install. If things didn't go as expected, check the following:

Your PATH environment variable may be incorrect

When you first installed Python, the installer probably added the PATH automatically to your ~/.profile or ~/.bash_profile. However, in case it didn't, it should look something like this:

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH

You may additionally need to add the PYTHONPATH variable and have it point to the site-packages directory of your Python version; for example, for a Python 3.6 installation, the variable could look like this:

export PYTHONPATH="${PYTHONPATH}/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages"
Running without installing

You can also run cards.py without installing it. However, in that case, you must execute the cards module as a script.

Assuming working directory is the root of the project, you go like this:

$ python3 -m cards make cards.csv

Requirements

This project strives to keep dependencies at an absolute minimum.

  • Python 3.5+
  • docopt - provides a nicer command-line interface

Browser support

  • Safari
  • Chrome

Examples

See Trickbook, or Dungeon Deck for examples of real projects.

Full usage

Generate print-ready cards for your tabletop game

Usage:
  cards make [<datasource>]... [--definitions=<defs>]
             [--output-path=<path>] [--output-file=<file>] [--include-header=<template>]
             [--card-size=<size>] [--force-page-breaks] [--disable-backs] [--disable-page-sections]
             [--discover] [--preview] [--verbose]
  cards new  [<name>] [--output-path=<path>] [--verbose]
  cards -h | --help
  cards --version

Examples:
  cards make cards.csv
    Builds the 'cards.csv' datasource and outputs to the current directory.

  cards make cards.csv tokens.csv -d defs.csv -o ~/Desktop
    Builds both 'cards.csv' and 'tokens.csv' datasources with the definitions 'defs.csv',
    and outputs to the specified path (the desktop in this case).

  cards new "Empty Game"
    Creates an empty project in the current directory.

Options:
  -h --help                         Show program help
  -o --output-path=<path>           Specify output directory
  -f --output-file=<file>           Specify output filename [default: index.html]
  -p --include-header=<template>    Specify a presentation template
  -d --definitions=<defs>           Specify definitions filename
  --card-size=<size>                Specify default card size [default: standard]
                                    Other options include: \'domino\', \'jumbo\' or \'token\'
  --force-page-breaks               Force a page break after each datasource
  --disable-backs                   Do not render card backs
  --disable-page-sections           Do not render page sections
  --discover                        Automatically find and use datasources in the current directory
  --preview                         Only render 1 of each card
  --verbose                         Show more information
  --version                         Show program version

Why make this?

I'm making this because it should be easier getting your ideas to the table.

There's already plenty of tools that solve this problem. Some are free (nanDeck, Squib), some are expensive (inDesign). Some seem really good (but are not available yet, Paperize).

However, common for most of them is that they are more complicated than I think they need to be.

Though these tools provide you with a wide range of options and possibilities, you first have to get past the (steep) learning curve before you can really use them proficiently.

The hope and intent of this tool is to provide a way to get a prototype built quickly and with as little hassle and setup as possible, while still providing options for customizing your cards as much- or as little, as you want to.

It's also just a fun project to work on; so there's that!

Contributing

If you find any problems using this software, please open an issue or submit a fix as a pull request.

Please refer to CONTRIBUTING for further information.

License

See LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].