2016-05-09 14:13:48 -04:00
|
|
|
# TeamspeakStats [![Build Status](https://travis-ci.org/Thor77/TeamspeakStats.svg?branch=master)](https://travis-ci.org/Thor77/TeamspeakStats) [![Coverage Status](https://coveralls.io/repos/Thor77/TeamspeakStats/badge.svg?branch=master&service=github)](https://coveralls.io/github/Thor77/TeamspeakStats?branch=master) [![Code Health](https://landscape.io/github/Thor77/TeamspeakStats/master/landscape.svg?style=flat)](https://landscape.io/github/Thor77/TeamspeakStats/master) [![Requirements Status](https://requires.io/github/Thor77/TeamspeakStats/requirements.svg?branch=master)](https://requires.io/github/Thor77/TeamspeakStats/requirements/?branch=master)
|
2015-03-05 12:48:10 -05:00
|
|
|
A simple Teamspeak stat-generator - based on server-logs
|
2015-03-05 12:53:47 -05:00
|
|
|
|
2015-07-13 15:14:03 -04:00
|
|
|
# Installation
|
|
|
|
- Install [Python](https://python.org)
|
|
|
|
- Clone this repo `git clone https://github.com/Thor77/TeamspeakStats`
|
|
|
|
- Install requirements `pip3 install -r requirements.txt`
|
|
|
|
|
2015-03-13 16:03:42 -04:00
|
|
|
# Usage
|
|
|
|
Run `tsstats.py` and point your web-server to the generated .html-file, now you will see some stats for your Teamspeak-Server parsed from the logs.
|
|
|
|
|
2015-07-13 15:36:53 -04:00
|
|
|
# Tests
|
2015-07-17 09:39:16 -04:00
|
|
|
- Install testing-requirements `pip3 install -r testing_requirements.txt`
|
2015-07-13 15:36:53 -04:00
|
|
|
- Run `nosetests`
|
|
|
|
|
2015-08-26 14:00:48 -04:00
|
|
|
# CMD-Arguments
|
|
|
|
```
|
|
|
|
usage: tsstats.py [-h] [--config CONFIG] [--idmap IDMAP] [--debug]
|
|
|
|
[--debugfile]
|
|
|
|
|
|
|
|
A simple Teamspeak stats-generator - based on server-logs
|
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
--config CONFIG path to config
|
|
|
|
--idmap IDMAP path to id_map
|
|
|
|
--debug debug mode
|
|
|
|
--debugfile write debug-log to file
|
|
|
|
```
|
|
|
|
|
2015-03-05 12:53:47 -05:00
|
|
|
# Configuration
|
|
|
|
|
|
|
|
###Configname
|
|
|
|
`config.ini`
|
2015-05-12 15:38:34 -04:00
|
|
|
#### Keys
|
2015-03-05 12:53:47 -05:00
|
|
|
`[General]`
|
2015-07-13 15:23:55 -04:00
|
|
|
- logpath `Path to TS3Server-logfile` (supports [globbing](https://docs.python.org/3/library/glob.html))
|
2015-03-05 12:53:47 -05:00
|
|
|
- outputfile `Path to the location, where the generator will put the generated .html-file`
|
2015-07-13 15:23:55 -04:00
|
|
|
|
2015-05-12 15:38:34 -04:00
|
|
|
`[HTML]`
|
|
|
|
- title `HTML-Title`
|
2015-05-18 13:43:37 -04:00
|
|
|
|
2015-03-05 12:53:47 -05:00
|
|
|
|
|
|
|
## Example
|
|
|
|
```
|
|
|
|
[General]
|
2015-07-13 15:23:55 -04:00
|
|
|
logfile = /usr/local/bin/teamspeak-server/logs/ts3server*_1.log
|
2015-03-05 12:53:47 -05:00
|
|
|
outputfile = /var/www/html/stats.html
|
2015-05-12 15:38:34 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
# ID-Mapping
|
|
|
|
`id_map.json`
|
|
|
|
You can map multiple ID's to one (for example, when an user creates a new identity)
|
|
|
|
## Example
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"1": "2",
|
|
|
|
"3": "2"
|
|
|
|
}
|
2015-03-05 12:53:47 -05:00
|
|
|
```
|
2015-05-12 15:38:34 -04:00
|
|
|
The online-time of `1` and `3` will be added to the online-time of `2`
|
2015-03-13 16:03:42 -04:00
|
|
|
|
|
|
|
# TODO
|
|
|
|
- Localization
|