{"id":27118056,"url":"https://github.com/royborgen/secretsanta","last_synced_at":"2025-04-07T06:50:03.982Z","repository":{"id":180566699,"uuid":"282747909","full_name":"royborgen/SecretSanta","owner":"royborgen","description":"If your doing a secret santa gift exchange with friends, family or coworker this is for you. The script reads a list of Santas (names and corresponding e-mails) and randomly matches each of the names with one of the other Santas on the list (a child). The script then sends an e-mail to each Santa informing them who their child is. ","archived":false,"fork":false,"pushed_at":"2024-11-20T20:46:10.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T21:36:37.840Z","etag":null,"topics":["christmas","e-mail","randomizer","santa","secretsanta"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/royborgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-26T23:04:21.000Z","updated_at":"2024-11-20T20:46:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"70ac9747-ab8b-4a36-b9b8-4bf66eccbf4d","html_url":"https://github.com/royborgen/SecretSanta","commit_stats":null,"previous_names":["royborgen/secretsanta"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royborgen%2FSecretSanta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royborgen%2FSecretSanta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royborgen%2FSecretSanta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royborgen%2FSecretSanta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royborgen","download_url":"https://codeload.github.com/royborgen/SecretSanta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608149,"owners_count":20965950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["christmas","e-mail","randomizer","santa","secretsanta"],"created_at":"2025-04-07T06:50:03.319Z","updated_at":"2025-04-07T06:50:03.924Z","avatar_url":"https://github.com/royborgen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecretSanta\nSecretSanta reads a list of Santas(names and corresponding e-mails) and randomly matches each of the names with one of the other Santas on the list (a child). The script then sends an e-mail to each santa informing them who their child is. The script is highly customizable, enabling you to easily configure the email content, server settings and sender information through a configuration file. \n\n## Usage\nThe script is executed by running drawsanta.py\n\n# secretsanta.conf\nThis is the scripts configuration file. \nIf no configuration file exists, a default one will be created automatically.\nThe file contains general, mailserver, email and logging settings. \n\n```\n[general]\nsantaslist = santas.txt\n\n[mailserver]\nserver = your.mailserver.com\nssl = yes\nstarttls = yes\nport = 587\nrequireauth = yes\npromptforauth = yes\nusername = \npassword = \n\n[email]\nfromname = Santas little helper\nfromemail = secretsanta@yourdomain.com\nsubject = Secret Santa\nemailcontent = email.txt\n\n[logging]\ncreatelogfile = yes\nlogfile = santas.log\nlogtimeformat = %%d-%%m-%%Y %%H:%%M:%%S\n```\nusername and password can be empty if **promptforauth = yes**\n\n## stantas.txt\nContains a list names and emails of everyone participating in Secret Santa. \nThe name of the file can be changed by editing **secretsanta.conf** and changing the value of **santaslist** under the general section. \n\nExample \nstantas.txt uses the following format\n```\nJohn,john@ourfamilydomain.com\nMary,mary@ourfamilydomain.com\nSarah,sarah@ourfamilydomain.com\nJoseph,joseph@ourfamilydomain.com\nMark,mark@ourfamilydomain.com\nJessica,jessica@ourfamilydomain.com\n```\n\n## email.txt\nThis file contains the mail content that will be sent to each of the Santa's.\nFilename and location can be changed by modifying **emailcontent** in **secretsantas.conf**\n\nDefault email.txt: \n\n```\nHO HO HO!\nMarry Christmas %santaName%!\n\nThis years family secret santa has been picked and you are santa for %childName%.\nPlease try not to overspend and keep within the agreed amount of 200 kr. \n\nHope you have a fantastic Christmas.\n\nYours truly,\nSantas little helper\n```\n**%santaNAme%** is a placeholder for the name read from santas.txt\n**%childname%** is a placeholder for the name of the child that each Santa has to buy a gift for.\n\n\n## Logging\nThere is an option to log to file. By default the script logs to santas.log in the same folder as the script is located. \nLogging can be disabled by setting **createlogfile = no** in **secretsanta.conf**. \nName and location of the configuration file can be changed by changing the values of **logfile** in **secretsanta.conf** \n\n\n## Example of script output\nWhen running the script each Stantas child is cencored in the output. \n```\nSending mail...\nJohn \u003cjohn@ourfamilydomain.com\u003e --\u003e **********\nMary \u003cmary@ourfamilydomain.com\u003e --\u003e **********\nSarah \u003csarah@ourfamilydomain.com\u003e --\u003e **********\nJoseph \u003cjoseph@ourfamilydomain.com\u003e --\u003e **********\nMark \u003cmark@ourfamilydomain.com\u003e --\u003e **********\nJessica \u003cjessica@ourfamilydomain.com\u003e --\u003e **********\nDone!\n6 mails sent\n```\nsetting **createlogfile = yes** in **secretsanta.conf** will log the uncensored output to file. \n\n\n## resend.py\nResends Secret Santa e-mail to one or all santas in last drawing. \n```\nUsage: resend [OPTION]... [SANTA]\n\n    -a. --all       Resends mail to all stanas in last drawing\n    -v, --version   Outputs version information and exits\n        --help      Displays this help text\n\nExample:\nresend john         Resends email to john based on entry in logfile\nresend --all        Resends email to all santas in last drawing\n```\n\n## Requirements\n- Python 3 \n- Requests library installed \n- sys library installed \n- random library installed\n- getpass library installed\n- datetime library installed\n- smtplib library installed\n- configparser library installed\n- os library installed\n- re library installed\n- EmailMessage library installed\n- datetime library installed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyborgen%2Fsecretsanta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyborgen%2Fsecretsanta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyborgen%2Fsecretsanta/lists"}