-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
secretsanta.pl: Script to compute random secret santa exchanges
- Loading branch information
0 parents
commit e53b612
Showing
7 changed files
with
1,284 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*~ | ||
participants.yml | ||
emailconf.yml | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Secret Santa Randomizer and Mailer | ||
================================== | ||
|
||
`secretsanta.pl` is a script used to set up a secret santa gift exchange. It | ||
reads a list of participants from a YAML file, matches them randomly, and | ||
optionally sends an email to each participant informing them of their match. | ||
|
||
Setup | ||
===== | ||
|
||
This program doesn't need to be installed, however it does have some perl | ||
dependencies. You should have a local perl 5 installation from your system, | ||
which should include CPAN. If you don't have `cpan` installed and configured, | ||
you can configure a local CPAN installation in your home directory: | ||
|
||
``` | ||
cpan App::cpanminus | ||
``` | ||
|
||
After installing cpanminus, you will need to re-source your `~/.bashrc`. | ||
|
||
Once you have `cpanm` installed, just run: | ||
|
||
``` | ||
cpanm --installdeps . | ||
``` | ||
|
||
After that completes, you should be able to run `secretsanta.pl -h`. | ||
|
||
Usage | ||
===== | ||
|
||
See the full help by running `secretsanta.pl --man`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
requires 'Email::Simple'; | ||
requires 'Email::Sender::Simple'; | ||
requires 'Email::Sender::Transport::SMTP'; | ||
requires 'MIME::Base64'; | ||
requires 'Authen::SASL'; | ||
requires 'File::Slurp'; | ||
requires 'YAML'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- mode: yaml -*- | ||
# vim: set expandtab ts=4 sw=4: | ||
# vim: set syntax=yaml: | ||
--- | ||
msghdr: | ||
from: 'Secret Santa <[email protected]>' | ||
subject: '[Confidential] Your Secret Santa Info' | ||
msgbody: | | ||
Hi @FROM@, | ||
Thanks for participating in this year's Secret Santa! We will meet on a | ||
yet-to-be-finalized date to open gifts together and revel in the glory. Expect | ||
another email soon confirming a date and time. | ||
You have been chosen as the secret santa for: @TO@ | ||
|
||
Their mailing address is: | ||
@TO_ADDRESS@ | ||
|
||
As a reminder, here are some guidelines: | ||
|
||
* Keep the gift in a reasonable price range, including any shipping costs. | ||
* Please be sure the gift will arrive before Christmas. | ||
|
||
Happy Holidays! | ||
smtpconf: | ||
# Arguments to Email::Sender::Transport::SMTP | ||
# FYI Depends on CPAN modules MIME::Base64 and Authen::SASL | ||
host: smtp.example.com | ||
ssl: 1 | ||
port: 465 | ||
# SMTP username | ||
sasl_username: '[email protected]' | ||
# SMTP password | ||
sasl_password: asdf1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- mode: yaml -*- | ||
# vim: set expandtab ts=4 sw=4: | ||
# vim: set syntax=yaml: | ||
--- | ||
participants: | ||
- name: Alice Appleseed | ||
email: [email protected] | ||
address: |- | ||
Alice Appleseed | ||
c/o Secret Santa | ||
1500 Main Street | ||
Anytown, USA 12345 | ||
excludes: [] | ||
- name: Bob Roberts | ||
email: [email protected] | ||
address: |- | ||
Bob Roberts | ||
c/o Secret Santa | ||
1500 Main Street | ||
Anytown, USA 12345 | ||
excludes: [] | ||
- name: John Doe | ||
email: [email protected] | ||
address: |- | ||
John Doe | ||
c/o Secret Santa | ||
1501 Main Street | ||
Anytown, USA 12345 | ||
excludes: | ||
- Jane Doe | ||
- name: Jane Doe | ||
email: [email protected] | ||
address: |- | ||
Jane Doe | ||
c/o Secret Santa | ||
1501 Main Street | ||
Anytown, USA 12345 | ||
excludes: | ||
- John Doe |
Oops, something went wrong.