Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sophilabs/draws

Take a file containing comma separated values and pick a winner in a stylish way
https://github.com/sophilabs/draws

python unmaintained

Last synced: 18 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# Draws

[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

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:

```bash
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:
```bash
./draws.py mydraw.csv
```

But you can specify your own to fit your needs.

In this example first name, last name, and email:
```bash
./draws.py sophilabs.csv --winner-label "{first} {last} <{email}>" --list-label "{first} {last}"
```
![draws.py](http://media.site.sophilabs.com/experiments/images/draws-no-logo.png "draws.py")

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

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

![draws.py with logo](http://media.site.sophilabs.com/experiments/images/draws-with-logo.png "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](/LICENSE) file.

## About

[![sophilabs.co](https://s3.amazonaws.com/sophilabs-assets/logo/logo_300x66.gif)](https://sophilabs.co)

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