Code Monkey home page Code Monkey logo

teamsort-cli's Introduction

CSGO Teamsorting

This project uses Minizinc and the COIN-OR CBC solver to create even teams from a list of players with ranks.

This project is created to be used to create teams for CSGO tournaments but could probably be used in other context with some ajustments.

For our use the teams generated often needs some manual work to get optimal teams, but is a great tool to get a good starting point to work from.

Docker

Build the Dockerfile

docker build -t teamsort .

then run it

docker run -v $(pwd)/input:/input --rm teamsort /input/example.txt

Installation

  1. Nodejs and yarn
  2. Minizinc and solver
    Install COIN-OR CBC (https://www.minizinc.org/doc-2.4.2/en/installation_detailed.html) and Minizinc (https://www.minizinc.org/doc-2.4.2/en/installation.html). Note: "MiniZinc contains a built-in interface to CBC, so in order to use it you have to install CBC before compiling MiniZinc."
  3. From cli directory run npm install and npm build

Usage

Install manually og use the provided dockerfile. See seperate sections for these.

To run the command from manuall install: ./cli/build/teamsort. Run without any parameters for usage information.

The CLI has two different options for use. One for terminal output and one which additionally posts the result to a trello board. A file with a list of players with ranks is required in both of them.

Input file

The input file needs lists one player per line where player name and rank seperated by tab (\t) is the minimum requirement. You can also provide an alias for the rank (for output readability) and specify which team you want a given player (or set of players) to end up in.

Full format is: player name, rank alias, team, rank (player_a rank_name_1 1 1).

See [input/example.txt] for an example.

Trello integration

To use the trello integration you need to get an API key and token: https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#authentication-and-authorization

These can then be provided as environment variables, through an .env file or as parameters in the cli.

Future plans

  • Player ID as an input option (Steam ID for integration with Get5/G5API)
  • Other input formats
  • Send the result to G5API
  • Read teams out of trello to send to other integration (G5API)

teamsort-cli's People

Contributors

jorgengranseth avatar ringvold avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jorgengranseth

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.