Sync kimai data to the default timesheet provided by the University of Passau for student assistants.
Clone this repository, then execute:
pip install -r requirements.txt
You have two options to sync data. You either export a csv file from kimai and use it as a source for the script, or you enter your api credentials to sync grab the data directly from kimai without manual exporting.
You always have to specify the following parameters:
- target (the target excel file)
- template (the excel template)
If you're using the api as the data source you have to specify the following additional parameters:
- url
- user
- api password
- activity name
- month
A call could look like this:
python3 main.py api --url "https://demo.kimai.org" --user john_user --password "api_kitten" --activity "Work" --month 1 --target ~/timesheet.xlsx --template ~/template.xlsx
If you want to use a csv file as the source, you have to specify the path to it. The following call uses ~/source.csv
as a data source:
python3 main.py csv --source ~/kimai.csv --target ~/timesheet.xlsx --template ~/template.xlsx
For further info execute python3 main.py --help
.