/secret-santa

Python script to draw names for Secret Santa gift exchange

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Purpose

I was asked to draw the names for my family's secret santa and I thought: well, I can develop a program to do this. So I did.

Getting Started

Prerequisites

  • Python 3

Template Message

The standard templateMessage found here can be easily changed according to your will.

Hello, ${Name}!

In this year's Secret Santa gift exchange you drew ${SecretFriend}.

On line 137:

        message = template.substitute(Name=name.title(), SecretFriend=secretFriendName)

This line is actually replacing ${Name} with name.title() and ${SecretFriend} with secretFriendName. If you want to change the standard message, you probably will only need to change the templateMessage.txt and this line.

You can read more about templates here.

Instructions

  • Make sure you use an appropriate template message, you can change the templateMessage.txt if you want.
  • Put your contacts and their e-mail in contacts.csv and let the program deal with it.
  • Simply run python secretSanta.py.

Acknowledgments

  • I used this link to get started with the e-mail part.