diff --git a/tsstats/__main__.py b/tsstats/__main__.py index 961b646..cf9ffa0 100644 --- a/tsstats/__main__.py +++ b/tsstats/__main__.py @@ -50,6 +50,10 @@ def cli(): '-dtf', '--datetimeformat', type=str, help='format of date/time-values (datetime.strftime)' ) + parser.add_argument( + '-otth', '--onlinetimethreshold', + type=int, help='threshold for displaying onlinetime (in seconds)' + ) options = parser.parse_args() if 'config' in options: configuration = config.load(options.config) @@ -91,7 +95,9 @@ def main(configuration): clients, output=abspath(configuration.get('General', 'output') + ext), template_path=configuration.get('General', 'template'), - datetime_fmt=configuration.get('General', 'datetimeformat') + datetime_fmt=configuration.get('General', 'datetimeformat'), + onlinetime_threshold=int(configuration.get( + 'General', 'onlinetimethreshold')) ) diff --git a/tsstats/config.py b/tsstats/config.py index 3d11a56..e69c366 100644 --- a/tsstats/config.py +++ b/tsstats/config.py @@ -18,7 +18,8 @@ DEFAULT_CONFIG = { 'idmap': '', 'onlinedc': True, 'template': 'template.html', - 'datetimeformat': '%x %X %Z' + 'datetimeformat': '%x %X %Z', + 'onlinetimethreshold': -1 } }