Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcpips

Playing Card Pips - code for laying out the suit symbols for basic number playing cards.

This is for making decks of cards where the face cards (Aces, Jokers, Queens, Kings, Jacks) are your own images, but the standard 2 thru 10 cards are just default layouts. This is useful especially when working with sites like Make Playing Cards that help to customize individual cards and then print the deck. At least, that was the initial use-case --- to fill in the defaults when it's only some of the special cards you want to be customized.

There are output image files with and without corner numbers, checked in with the code. Feel free just to use the images if they already work for you.

The layouts, sizes, colours, margins, and so on, have all been hand-tuned so far --- they look OK to me! But they haven't been calculated that carefully, feel free to edit the code directly to change them.

Simple Playing Card Generator

This Python script generates the layout of standard playing cards using Matplotlib. It handles the placement of pips (the small symbols) and optional corner numbers and symbols. This script serves as a template for creating the core design of playing cards—you can easily add your own custom face cards or additional design elements.

Features

  • Generate standard playing card layouts with pips in the center.
  • Optionally include numbers and suit symbols in the corners.
  • Customize font, colors, and layout.
  • Save cards as PNG images with customizable output directory.

Requirements

  • Python 3.x
  • Matplotlib

Usage

  1. Clone the repository:

    git clone https://github.com/dwiddows/pcpips.git
    cd pcpips
  2. Install the required packages:

pip install matplotlib
  1. Run the script:
   python draw_pips.py --output-dir=playing_cards_corners --corners

This will generate playing cards with corner symbols and save them in the playing_cards directory.

Example Output

The cards generated by this script are saved as PNG images. Here’s an example of the 10 of Hearts:

Example Card

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This code was written collaboratively with ChatGPT by OpenAI. Special thanks to ChatGPT for providing helpful guidance and code suggestions throughout the development of this project.

Advanced Card Design Tools

For more sophisticated card design projects, you might want to explore these tools:

About

Playing Card Pips - code for laying out the suit symbols for basic number playing cards.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages