Skip to content

Provide alternative to SMTP #11

@cristoper

Description

@cristoper

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:

  1. 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:
      1. Parse the main config file.
      2. Create a new directory (e.g., assignments/).
      3. Iterate through the assignments, writing each Santa's assignment into a separate text file within that directory (e.g., assignments/For_Santa_A.txt).
      4. 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.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions