A script that allows you to organise a secret santa game.
Go to file
Stefan Sterz a763c653bd
fix: remove typos etc.
2018-09-24 23:06:21 +02:00
.gitignore fix: small fix and add readme and LICENSE 2018-09-09 22:37:01 +02:00
LICENSE fix: small fix and add readme and LICENSE 2018-09-09 22:37:01 +02:00
README.md fix: remove typos etc. 2018-09-24 23:06:21 +02:00
config.json feat: implement email and argument handeling 2018-09-08 21:02:29 +00:00
participants.json feat: implement email and argument handeling 2018-09-08 21:02:29 +00:00
wichteln.py fix: small fix and add readme and LICENSE 2018-09-09 22:37:01 +02:00

README.md

Wichteln

This is a small script that allows you to organize a secret santa game (or »Wichteln« in German). It accepts the following arguments:

  • -h displays a help message
  • -c FILE or --config FILE specifies the location of the configuration file, which should contain all information needed to connect to an SMTP server. An example configuration file is given in config.json. It also defaults to config.json.
  • -p FILE or --participants FILE specifies the location of the file containing a list of participants. An example file is provided in participants.json. It also defaults to participants.json.

participants.json Format

The participants.json file contains an array of objects. Each objects should specifiy the following three fields:

  • name The name of the participant
  • mail The email adress of the participant
  • gender This field is necessary, because this script has to send emails adressing each participant correctly and in German that depends on the gender of the recipient. However instead of just choosing a boolean value to represent gender, I chose to just store the actually needed information: the ending for the German word »Lieb(e|er|...)«. This allows for more then two genders and is in my opinion generally a little bit more elegant to use in this context.

Note: This script was created in a German-speaking context, if you want to adapt the emails that this script sends, change the text in lines 78 and 81-84.