<commit_before># Klesk
Klesk is a Slack service to store and return ladder data for Quake Live or whatever game you like.

## Features
- Creating new ladder
- Joining existing ladder
- Adding match result
- Showing user statistics for ladder
- Showing ranking

## Installation
Simply run inside Klesk directory:

`npm install`

Running and testing application requires: mocha, webpack and nodemon.

`npm install -g mocha webpack nodemon`

### Running Klesk for development
`webpack` (or `webpack -w` for watching files) for building the app.

`npm run watch` for watching build output and restarting service.

Before building create **config.js** file in the root directory.
Just copy following configuration and customize what you need

```
export default {
  port: 1666,
  storageFilename: 'ladders.json',
  mapsFilename: 'maps.json',
  notificationWebhookAddress: 'https://your-incoming-slack-hook',
  notificationChannel: '#notifications', //OPTIONAL: if not set then slack incoming-webhook default channel will be used
  botUsername: 'Klesk', //OPTIONAL: if not set then slack incoming-webhook name will be used
  botIconUrl: 'http://absolute-path-to-your-bot-icon' //OPTIONAL: if not set slack default bot icon will be used
};
```

maps.json schema example:

```
[
  { "name": "Campgrounds" },
  { "name": "Aerowalk" }
  ...
]
```
<commit_msg>updated Readme with logger stuff / probably closes #22<commit_after># Klesk
Klesk is a Slack service to store and return ladder data for Quake Live or whatever game you like.

## Features
- Creating new ladder
- Joining existing ladder
- Adding match result
- Showing user statistics for ladder
- Showing ranking

## Installation
Simply run inside Klesk directory:

`npm install`

Running and testing application requires: mocha, webpack and nodemon.

`npm install -g mocha webpack nodemon`

### Running Klesk for development
`webpack` (or `webpack -w` for watching files) for building the app.

`npm run watch` for watching build output and restarting service.

Before building create **config.js** file in the root directory.
Just copy following configuration and customize what you need

```
export default {
  port: 1666,
  storageFilename: 'ladders.json',
  mapsFilename: 'maps.json',
  notificationWebhookAddress: 'https://your-incoming-slack-hook',
  notificationChannel: '#notifications', //OPTIONAL: if not set then slack incoming-webhook default channel will be used
  botUsername: 'Klesk', //OPTIONAL: if not set then slack incoming-webhook name will be used
  botIconUrl: 'http://absolute-path-to-your-bot-icon' //OPTIONAL: if not set slack default bot icon will be used
  logErrorsToFile: true, // whether to log to file or only to console
  errorsLogPath: './'
};
```

maps.json schema example:

```
[
  { "name": "Campgrounds" },
  { "name": "Aerowalk" }
  ...
]
```

{'fraction_non_alphanumeric': 0.09784528435181915, 'fraction_numerical': 0.0035323207347227126, 'mean_word_length': 4.2835820895522385, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1579114', 'n_tokens_mistral': 848, 'n_tokens_neox': 817, 'n_words': 341}