<commit_before>### Installation on Debian Stretch

```
# base apps
sudo apt-get install python3 python3-pip postgresql git

# install qllr
git clone https://github.com/em92/quakelive-local-ratings
cd ./quakelive-local-ratings
sudo pip3 install -r requirements.txt
```

Assuming that we are making database "qllr" with owner's name "eugene" and password "<PASSWORD>".
If not - edit cfg.json to change "db_url" key.

* creating database in postgresql

```
sudo -u postgres psql
```

* in postgresql shell:
```
CREATE DATABASE qllr;
CREATE USER eugene WITH password '<PASSWORD>';
GRANT ALL ON DATABASE qllr TO eugene;
\q
```

* deploying database
```
psql -h localhost qllr eugene
```

* in postgresql shell:
```
\i sql/init.sql
\q
```

That's it. Now run in separate screen.

```
./main.py
```

### Installing and configurating feeder

```
git clone https://github.com/PredatH0r/XonStat.git
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install npm
sudo apt-get install libzmq3
sudo apt-get install libzmq3-dev
cd XonStat/feeder
npm install
mkdir ql-match-jsons
mkdir ql-match-jsons/errors
sed -i.bak '/database/d' cfg.json
```

Now run in separate screen.
```
node feeder.node.js
```

It will run on 8081 port by default. Visit http://YOUR-HOST-HERE:8081 and add your quake live server(s) there.<commit_msg>added note about xonstatSubmissionUrl<commit_after>### Installation on Debian Stretch

```
# base apps
sudo apt-get install python3 python3-pip postgresql git

# install qllr
git clone https://github.com/em92/quakelive-local-ratings
cd ./quakelive-local-ratings
sudo pip3 install -r requirements.txt
```

Assuming that we are making database "qllr" with owner's name "eugene" and password "<PASSWORD>".
If not - edit cfg.json to change "db_url" key.

* creating database in postgresql

```
sudo -u postgres psql
```

* in postgresql shell:
```
CREATE DATABASE qllr;
CREATE USER eugene WITH password '<PASSWORD>';
GRANT ALL ON DATABASE qllr TO eugene;
\q
```

* deploying database
```
psql -h localhost qllr eugene
```

* in postgresql shell:
```
\i sql/init.sql
\q
```

That's it. Now run in separate screen.

```
./main.py
```

By default it is running on port 7081.


### Installing and configurating feeder

```
git clone https://github.com/PredatH0r/XonStat.git
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install npm
sudo apt-get install libzmq3
sudo apt-get install libzmq3-dev
cd XonStat/feeder
npm install
mkdir ql-match-jsons
mkdir ql-match-jsons/errors
sed -i.bak '/database/d' cfg.json
```

Edit cfg.json. *xonstatSubmissionUrl* value must point to our qllr (example http://YOUR-HOST-HERE:7081/stats/submit).

Now run in separate screen.
```
node feeder.node.js
```

It will run on 8081 port by default. Visit http://YOUR-HOST-HERE:8081 and add your quake live server(s) there.
{'fraction_non_alphanumeric': 0.11785216178521618, 'fraction_numerical': 0.01394700139470014, 'mean_word_length': 4.033333333333333, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '7452385', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1002, 'n_words': 343}