It is based on https://github.com/pieye/toggl2clockify and significant part of the code is just copied from there. Credits to Markus Proeller, [email protected].
- Create virtual env:
python -m venv venv
and activate it:. ./venv/bin/activate
. - Install requirements:
pip install -r requirements.txt
. - Set proper values in
config.json
, useconfig_example.json
as a base. - Run it:
python main.py
ClockifyApiKey
- API key to your account in clockifyClockifyAdminEmail
- email of the person you want to assign the time entries (usually your own email). Should be the same as in Toggle (otherwise the script has to be updated)ClockifyWorkspace
- Clockify workspaceToggleApiKey
- API key for ToggleToggleWorkspace
- Toggle workspaceToggleFilterClient
- if you use a personal workspace and have just one client for all projects and want to filter by that one - fill the name, otherwise leave emptyToggleFilterUser
- username of the user whose time entries we want to acces - to find it go to https://track.toggl.com/timer and click "profile" in th bottom left, its the name writen above your emailFrom
- from when start exporting the data in formatYYYY-MM-DD
To
- end date for data export in formatYYYY-MM-DD
DeleteExistingFrom
- iftrue
, it deletes all entries from Clockify starting from theFrom
date (NOTE: that it even deletes entries with date>= To
)DryRun
- iftrue
, it does not export data to Clockify, just prints them to console
When your Clockify account is [email protected]
, target clockify workspace is Mild Blue
and source Toggle
workspace is Personal
with client Mild Blue
and user [email protected]
.
{
"ClockifyApiKey": "xxxxxxxxxxxxxxxxxx",
"ClockifyAdminEmail": "[email protected]",
"ClockifyWorkspace": "Mild Blue",
"ToggleApiKey": "yyyyyyyyyyyyyyyyyyyyyyyyyy",
"ToggleWorkspace": "Personal",
"ToggleFilterClient": "Mild Blue",
"ToggleUser": "my toggl username",
"From": "2021-01-01",
"To": "2021-01-31",
"DeleteExistingFrom": false,
"DryRun": false
}