Take a file containing comma separated values and pick a winner in a stylish way. We made this to automate the draw that took place at the end of PyConUy 2013.
draws.py
takes by default the fields name
and email
from a csv file.
So, if you have a mydraw.csv
file with this content:
name,email
Pablo Ricco,[email protected]
Eduardo Veiga,[email protected]
Richard Stallman,[email protected]
Sebastian Nogara,[email protected]
It will work without any extra arguments:
./draws.py mydraw.csv
But you can specify your own to fit your needs.
In this example first name, last name, and email:
./draws.py sophilabs.csv --winner-label "{first} {last} <{email}>" --list-label "{first} {last}"
With the extra argument --logo
you can put an ascii drawing on top of the draw.
./draws.py sophilabs.csv --logo sophilabs.logo
Draws uses modules present in the python standard library, so just clone and hack.
Draws is Copyright (c) 2017 sophilabs, inc. It is free software, and may be redistributed under the terms specified in the license file.
Draws is maintained and funded by sophilabs, inc. The names and logos for sophilabs are trademarks of sophilabs, inc.