It is based on https://github.com/pieye/toggl2clockify and significant part of the code is just copied from there. Credits to Markus Proeller, markus.proeller@pieye.org.
- Create virtual env:
python -m venv venvand activate it:. ./venv/bin/activate. - Install requirements:
pip install -r requirements.txt. - Set proper values in
config.json, useconfig_example.jsonas 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-DDTo- end date for data export in formatYYYY-MM-DDDeleteExistingFrom- iftrue, it deletes all entries from Clockify starting from theFromdate (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 mygmail+clockify@gmail.com, target clockify workspace is Mild Blue and source Toggle
workspace is Personal with client Mild Blue and user mygmail+toggl@gmail.com.
{
"ClockifyApiKey": "xxxxxxxxxxxxxxxxxx",
"ClockifyAdminEmail": "mygmail+clockify@gmail.com",
"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
}