Add username option and docstring for export kimai
This commit is contained in:
parent
b5b4eabf7f
commit
272cd6f3a9
@ -337,7 +337,12 @@ def export():
|
|||||||
@click.option('--mapping', help='Mapping file (default ~/.local/share/hamster/mapping.kimai.csv)')
|
@click.option('--mapping', help='Mapping file (default ~/.local/share/hamster/mapping.kimai.csv)')
|
||||||
@click.option('--output', help='Output file (default kimai.csv)')
|
@click.option('--output', help='Output file (default kimai.csv)')
|
||||||
@click.option('--category-search', help='Category search string')
|
@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:
|
if mapping is None:
|
||||||
mapping = HAMSTER_DIR / 'mapping.kimai.csv'
|
mapping = HAMSTER_DIR / 'mapping.kimai.csv'
|
||||||
if output is None:
|
if output is None:
|
||||||
@ -452,7 +457,7 @@ def kimai(mapping=None, output=None, category_search=None):
|
|||||||
'', # To (time)
|
'', # To (time)
|
||||||
duration,
|
duration,
|
||||||
'', # Rate
|
'', # Rate
|
||||||
'3wordchant',
|
username,
|
||||||
mapping_[0],
|
mapping_[0],
|
||||||
mapping_[1],
|
mapping_[1],
|
||||||
mapping_[2],
|
mapping_[2],
|
||||||
|
Loading…
Reference in New Issue
Block a user