Add cli-flag for datetimeformat and pass config-option to funccall

This commit is contained in:
Thor77 2016-09-17 22:41:38 +02:00
parent 4078e4b06b
commit 52fc1b487c
1 changed files with 6 additions and 1 deletions

View File

@ -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')
)