diff --git a/README.md b/README.md index 63a804c..1355c2f 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ A simple Teamspeak stat-generator - based on server-logs # CMD-Arguments ``` usage: tsstats [-h] [-c CONFIG] [--idmap IDMAP] [-l LOG] [-o OUTPUT] [-d] + [-nod] A simple Teamspeak stats-generator - based on server-logs @@ -29,6 +30,7 @@ optional arguments: -o OUTPUT, --output OUTPUT path to the output-file -d, --debug debug mode + -nod, --noonlinedc don't add connect until now to onlinetime ``` # Configuration diff --git a/docs/source/conf.py b/docs/source/conf.py index f918e5e..dc921b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,7 @@ author = 'Thor77' # The short X.Y version. version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.7.2' +release = '0.7.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 4f975dc..1cba229 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='tsstats', - version='0.7.2', + version='0.7.3', author='Thor77', author_email='thor77@thor77.org', description='A simple Teamspeak stats-generator', diff --git a/tsstats/__main__.py b/tsstats/__main__.py index 984dfd3..5e7e621 100644 --- a/tsstats/__main__.py +++ b/tsstats/__main__.py @@ -36,11 +36,16 @@ def cli(): '-d', '--debug', help='debug mode', action='store_true' ) + parser.add_argument( + '-nod', '--noonlinedc', + help='don\'t add connect until now to onlinetime', action='store_false' + ) args = parser.parse_args() main(**vars(args)) -def main(config=None, idmap=None, log=None, output=None, debug=False): +def main(config=None, idmap=None, log=None, + output=None, debug=False, noonlinedc=True): if debug: logger.setLevel(logging.DEBUG) @@ -64,7 +69,7 @@ def main(config=None, idmap=None, log=None, output=None, debug=False): if not log or not output: raise InvalidConfiguration('log or output missing') - clients = parse_logs(log, ident_map=identmap) + clients = parse_logs(log, ident_map=identmap, online_dc=noonlinedc) render_template(clients, output=abspath(output))