Skip to content

Take a file containing comma separated values and pick a winner in a stylish way

License

Notifications You must be signed in to change notification settings

sophilabs/draws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Draws

No Maintenance Intended

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.

Usage

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,pricco@sophilabs.com
Eduardo Veiga,eveiga@sophilabs.com
Richard Stallman,rms@gnu.org
Sebastian Nogara,snogara@sophilabs.com

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}"

draws.py

With the extra argument --logo you can put an ascii drawing on top of the draw.

./draws.py sophilabs.csv --logo sophilabs.logo

draws.py with logo

Installation

Draws uses modules present in the python standard library, so just clone and hack.

License

Draws is Copyright (c) 2017 sophilabs, inc. It is free software, and may be redistributed under the terms specified in the license file.

About

sophilabs.co

Draws is maintained and funded by sophilabs, inc. The names and logos for sophilabs are trademarks of sophilabs, inc.

About

Take a file containing comma separated values and pick a winner in a stylish way

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages