Add onlinetimethreshold config and cli-option
to set render_template.onlinetime_threshold. Default value is -1 => no filtering to not cause confusion
This commit is contained in:
parent
4ac27143a6
commit
5637a11b2b
|
@ -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'))
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ DEFAULT_CONFIG = {
|
|||
'idmap': '',
|
||||
'onlinedc': True,
|
||||
'template': 'template.html',
|
||||
'datetimeformat': '%x %X %Z'
|
||||
'datetimeformat': '%x %X %Z',
|
||||
'onlinetimethreshold': -1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue