From 52fc1b487c474471e5eb1ddcbba01f6adfb7b474 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 17 Sep 2016 22:41:38 +0200 Subject: [PATCH] Add cli-flag for datetimeformat and pass config-option to funccall --- tsstats/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tsstats/__main__.py b/tsstats/__main__.py index dd44102..ac72df3 100644 --- a/tsstats/__main__.py +++ b/tsstats/__main__.py @@ -46,6 +46,10 @@ def cli(): '-t', '--template', type=str, help='path to custom template' ) + parser.add_argument( + '-dtf', '--datetimeformat', + type=str, help='format of date/time-values (datetime.strftime)' + ) options = parser.parse_args() if 'config' in options: configuration = config.load(options.config) @@ -86,7 +90,8 @@ def main(configuration): render_template( clients, output=abspath(configuration.get('General', 'output') + ext), - template_path=configuration.get('General', 'template') + template_path=configuration.get('General', 'template'), + datetime_fmt=configuration.get('General', 'datetimeformat') )