Probably the biggest hurdle to using this program is configuring an smtp server to send the assignments out anonymously. Better would be to produce assignment files that the organizer could just email or IM to participants.
Here's a potential plan:
-
Modify the sinterbot Command-Line Tool
In bin/sinterbot.py:
- Remove the
send subcommand and its associated send() function.
- Add a new
export subcommand with an export() function. This function will:
- Parse the main config file.
- Create a new directory (e.g.,
assignments/).
- Iterate through the assignments, writing each Santa's assignment into a separate text file within that directory (e.g.,
assignments/For_Santa_A.txt).
- Print a message to the user indicating where the files were saved.
- Update the success message in the
derange() function to recommend using the new export command.
-
Create a Separate sinterbot-sendmail Utility Script
- Create a new executable script, for example,
bin/sinterbot-sendmail.py.
- Move the code from the original
send() function (including its argument parsing logic) from bin/sinterbot.py into this new script.
- This script will be a standalone tool that takes the main config path and the
smtp.conf path as arguments. It will perform the email sending functionality exactly as the old send command did.
-
Update Documentation
In README.md:
- Modify the main "Usage" section to describe the new, primary workflow:
derange followed by export.
- Add a new section, perhaps titled "Optional: Emailing Assignments," that explains how to use the separate
sinterbot-sendmail.py script with an smtp.conf file for users who want to send emails directly.
Probably the biggest hurdle to using this program is configuring an smtp server to send the assignments out anonymously. Better would be to produce assignment files that the organizer could just email or IM to participants.
Here's a potential plan:
Modify the
sinterbotCommand-Line ToolIn
bin/sinterbot.py:sendsubcommand and its associatedsend()function.exportsubcommand with anexport()function. This function will:assignments/).assignments/For_Santa_A.txt).derange()function to recommend using the newexportcommand.Create a Separate
sinterbot-sendmailUtility Scriptbin/sinterbot-sendmail.py.send()function (including its argument parsing logic) frombin/sinterbot.pyinto this new script.smtp.confpath as arguments. It will perform the email sending functionality exactly as the old send command did.Update Documentation
In
README.md:derangefollowed byexport.sinterbot-sendmail.pyscript with ansmtp.conffile for users who want to send emails directly.