Create personalized Christmas and New Year Cards— with four lines of code!

Automated Card generation with the package cardmaker in Python

Forgot to send out Christmas cards? Worried that you won't be able to send your New Year’s greetings? Scared that you’ve run out of time to make personalized ones? Don’t worry! The Python package cardmaker allows you to automate the creation of Christmas cards, with only four lines of code! In this article, we will create a simple program to generate personalized Christmas cards.

First, install the package using pip:

pip install cardmaker

Then, type this in:

Cardmaker will create Christmas cards for each of the people mentioned in the list. It’ll save the generated Christmas cards in the root directory, the directory you are running the program from. Let’s take a look at a generated Christmas card:

Nice, huh?

Parameters:

There are many parameters you can tweak to personalize your card. Let’s take a look at them:

When we set the photoType to ‘sketch’ and set the fontColorMessage to ‘#000000’ like this:

a = card.cardmaker('Prabhu', ['Rahul'], './elephant.jpg', photoType='sketch', fontColorMessage='#000000')
a.create()

We get this card:

You can play with all of the features to generate stunning cards for every occasion!

Tip: You can use the Color Chart from https://htmlcolorcodes.com/ to get the corresponding hex value for the color you like!

New Features

You can look at new features and keep track of the current version by reading the log file here. The log file will also show how to implement these new features. More functionality will be added as quickly as possible, so stay on top of the new updates!

Github Repository

I write and code about all kinds of stuff: grokwithrahul.com