Whotowho

→ ‘How to assign one person to another’

What

WhoToWho is a simple script to find a random name in a list and
send this name by email. With WhoToWho you can define several things:

Email subject

Email contents with 2 parameters (who and towho)

SMTP configuration

SSL option if your SMTP connection is a Gmail account

History

WhoToWho was first made for my group of friends. For Christmas, we decided to
group up and each of us offer one present to one other person. The present’s price is
defined at the start.

Before WhoToWho, we made a group before Christmas Eve and made the
random choice with a little paper in hat.

Now we live in different places and we can’t see each other every week. So, as we all
have an email account, I created WhoToWho. This way nobody knows who must give
a present to whom and the choice is totally random.

Yes, WhoToWho is useless. But what is really useful anyway?

Features

Randomly pick a person for every person

Send an email to every person to know to whom he or she is assigned

Define the subject and the contents of the email with 2 parameters (who and to who)

You may exclude one or several persons for anybody in the list. With this
feature, one can’t randomly be assigned to another person.

Installing

sudogeminstallwhotowho

Requirements

ActionMailer from the Ruby On Rails project: geminstallactionmailer

Example

rubywhotowho-mmail-example.txt-s'A good subject'-f../data.yaml-cconf.yaml-g

Example data file

This file defines the list of names and emails. This file is in YAML
and is the serialization of an Array of an Array in Ruby. Here is an example:

--name-email--name2-email2--name3-email3

If you want to exclude a person to another you need add an
:exclude:
list of names after the email, like the following: