Whotowho

Get Version

0.2.0

→ ‘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:

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

Installing

sudo gem install whotowho

Requirements

Example

ruby whotowho -m mail-example.txt -s 'A good subject' -f ../data.yaml -c conf.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:

- - name
  - email
  - :exclude: - name2
- - name2
  - email2
  - :exclude: - name5
              - name6
- - name3
  - email3
- - name4
  - email4
- - name5
  - email5
- - name6
  - email6

Example email configuration file

It’s the same as ActionMailer’s. However I added the ability to add the “From” field, which you can add using the symbol :from:.

Example of email content file

This file is a simple text file. You have two parameters which are changed before the email is sent:

How to submit patches

The trunk repository is http://whotowho.rubyforge.org/svn/trunk for anonymous access. You can submit a patch on RubyForge or on my own development platform.

Rdoc

You can consult the Rdoc of this project on the WhoToWho RDoc page.

Thanks

Special thanks to Sunny for his translation in good english of this page.

License

This code is free to use under the terms of the MIT license.

Contact

Comments are welcome. Send an email to Cyril Mougel

Cyril Mougel, 6th January 2008
Theme extended from Paul Battley