- Reads contacts from contacts/contacts.csv
- Gets and encodes pictures from images/ (if there is no image - takes default one)
- Gets the email template with styling from templates/email_template.html
- Gets the matching history with previous matching from contacts/partner_history.json
- Loops through all contacts and generates random matches
- checks if the matches exist in contacts/partner_history.json
- if yes: repeats step 1 & 2
if the script cant find unique matches for 30 secs it stopps and informs the user that the history has to be cleared, because all matches were previously made
- sends emails to unique matches to inform them about their partner (using name, email and image)
- updates matching history
python3 --version
pip install pillow
- images have to be .jpeg to be encoded correctly!
- make sure to have no empty lines in the .csv file
- the ID of the person in the .csv has to be the filename of the persons image
contacts/contacts.csv
ID,email,Name
1,test.test@email.net,Max Muster
images/1.jpeg --> Picture of Max Muster