Add username option and docstring for export kimai

This commit is contained in:
3wc 2020-09-30 20:44:07 +02:00
parent b5b4eabf7f
commit 272cd6f3a9

View File

@ -337,7 +337,12 @@ def export():
@click.option('--mapping', help='Mapping file (default ~/.local/share/hamster/mapping.kimai.csv)')
@click.option('--output', help='Output file (default kimai.csv)')
@click.option('--category-search', help='Category search string')
def kimai(mapping=None, output=None, category_search=None):
@click.argument('username')
def kimai(username, mapping=None, output=None, category_search=None):
"""
Export time tracking data in Kimai format
"""
if mapping is None:
mapping = HAMSTER_DIR / 'mapping.kimai.csv'
if output is None:
@ -452,7 +457,7 @@ def kimai(mapping=None, output=None, category_search=None):
'', # To (time)
duration,
'', # Rate
'3wordchant',
username,
mapping_[0],
mapping_[1],
mapping_[2],