Giter Site home page Giter Site logo

randomcoffee's Introduction

RandomCoffee

Python Script to match people in groups of 2 from a list. (In this case for coffee pairs in slack)

Prerequisites

  • Python must be installed on the system.

Setup

  1. Download the randomCoffee.py file and put it into a folder of your choice
  2. If you are the organizer and want to participate in the randomCoffee matching, feel free to edit the script by including the commented out lines and adding your own slack username in the script.
     if '@YourSlackTag' not in members_list:
         members_list.append('@YourSlackTag')
  3. Open a terminal at that folder (on mac rightclick on folder -> "New Terminal at Folder")
  4. Make the file executable by running the following command
     chmod +x randomCoffee.py
  5. Now you should be able to run the script by double-clicking it in the finder.

Error Handling

If it does not work, try executing the script via the terminal ./randomCoffee.py. It should display an error message if it fails. One possible error is that it cannot find "python3". If that is the case, you can try changing the first line in the script to #!/usr/bin/env python

How to use

  1. If the setup worked, simply double click the application. A terminal window will open up with instructions:
Export Members by typing /who in the slack channel
Enter members:
  1. Go to the desired slack channel and type in /who in the message field and hit ENTER.
  2. The slackbot will output a list of all the members that are currently in the channel. Highlight and copy the comma-separated list of tags.
  3. Paste the list into a text field (for example the message field of slack).

    !! Pasting the list directly into the terminal window will not work, due to faulty line breaks!!

  4. Now copy the list you just pasted into the message field and paste it into the terminal and hit ENTER.
  5. The terminal outputs the number of members (useful for double checking if you missed someone when copying the usernames) and the list of matches
    Enter Members:
    R, A, T, P, SP, TA, G
    Number of Members 7
    
     - A ☕️ T
     - G ☕️ R
     - P ☕️ TA ☕️ SP
    
  6. You can copy the list of matches and close the terminal window afterwards.

randomcoffee's People

Contributors

feederhigh5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.