xRuiAlves / lichess-tournament-creator

CLI tool to create Lichess chess tournaments
MIT License
5 stars 2 forks source link

Lichess Tournament Creator

License: MIT npm version Build Status Coverage Status

CLI tool to create Lichess chess tournaments, built using NodeJS.

Features

Installing

Using npm:

$ npm i -g lichess-tournament-creator

Usage

$ lichess-tournament-creator <type> [...params]

Examples

$ lichess-tournament-creator arena "First anual chess meetup" "2021-01-01 16:30:00" 80 3 2 authtokenxpto123
$ lichess-tournament-creator swiss "Swiss-cheese open" switzerland-chess-club "2021-05-20 15:10:00" 7 5 3 authtokenxpto123
$ lichess-tournament-creator file my_tournaments.json

JSON tournaments file format

The JSON tournaments input file should follow the following format:

{
    "auth_token": "authtokenxpto123",   // lichess API authorization token, used in all requests
    "tournaments": [
        {
            "name": "First anual chess meetup",
            "type": "arena",
            "date": "2021-01-01 16:30:00",
            "tournament_duration": 80,
            "match": {
                "duration": 3,
                "increment": 2
            }
        },
        {
            "name": "Swiss-cheese open",
            "type": "swiss",
            "team_id": "switzerland-chess-club",
            "date": "2021-05-20 15:10:00",
            "num_rounds": 7,
            "match": {
                "duration": 5,
                "increment": 3
            }
        }
    ] 
}

Usage considerations

Tests

To run the test suite, install the project's dependencies and run npm test:

$ npm install
$ npm test

Future work

License

MIT