update readme and add tags
This commit is contained in:
parent
acc3153fba
commit
4c8dd9de4d
@ -52,4 +52,7 @@ hamster](https://github.com/projecthamster/hamster-lib) is ready.
|
|||||||
1. Run `hamster-tool activities list --csv` to get a dump of all activities
|
1. Run `hamster-tool activities list --csv` to get a dump of all activities
|
||||||
2. Review the export to check for any duplicates, typoes, etc.
|
2. Review the export to check for any duplicates, typoes, etc.
|
||||||
3. Use e.g. `hamster-tool activities move-facts ...` to clean them up
|
3. Use e.g. `hamster-tool activities move-facts ...` to clean them up
|
||||||
4.
|
4. Run `python -m hamstertools kimai import --mapping-path mapping.kimai.csv --show-missing --after 2021-09-07 --category-search auto 3wordchant` to find entries in your time tracking which don't yet have a mapping to Kimai. You might notice some extra tidying needed here.
|
||||||
|
5. Run `python -m hamstertools kimai sync --mapping-path mapping.kimai.csv --just-errors --ignore-activities 3wordchant $(pass users/calix/logins/kimai.autonomic.zone/api)` to find items in your mapping file which don't exist on Kimai
|
||||||
|
5. Run `python -m hamstertools kimai import --mapping-path mapping.kimai.csv --after 2021-09-07 --category-search auto 3wordchant -o kimai_$(date +%F).csv` to generate a CSV of your time entries
|
||||||
|
6. Review your timesheet -- NB it might not be sorted in date order by default - to make sure it has the expected entries, and remove any entries already in Kimai.
|
||||||
|
@ -496,6 +496,7 @@ def sync(username, api_key, just_errors, ignore_activities, mapping_path=None):
|
|||||||
just_errors or click.secho("Found activity '{0}'".format(activity_str), fg='green')
|
just_errors or click.secho("Found activity '{0}'".format(activity_str), fg='green')
|
||||||
found_activities.append(activity_str)
|
found_activities.append(activity_str)
|
||||||
|
|
||||||
|
|
||||||
@kimai.command('import')
|
@kimai.command('import')
|
||||||
@click.option('--mapping-path', help='Mapping file (default ~/.local/share/hamster/mapping.kimai.csv)')
|
@click.option('--mapping-path', 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)')
|
||||||
@ -521,7 +522,7 @@ def _import(username, mapping_path=None, output=None, category_search=None, afte
|
|||||||
next(mapping_reader)
|
next(mapping_reader)
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
'{0}:{1}'.format(row[0], row[1]): [row[2], row[3], row[4]]
|
'{0}:{1}'.format(row[0], row[1]): [row[2], row[3], row[4], row[5]]
|
||||||
for row in mapping_reader
|
for row in mapping_reader
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,7 +619,7 @@ def _import(username, mapping_path=None, output=None, category_search=None, afte
|
|||||||
mapping_[2],
|
mapping_[2],
|
||||||
fact[3] or '',
|
fact[3] or '',
|
||||||
'0', # Exported
|
'0', # Exported
|
||||||
'', # Tags
|
mapping_[3],
|
||||||
'', # Hourly rate
|
'', # Hourly rate
|
||||||
'', # Fixed rate
|
'', # Fixed rate
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user