All Projects → pieye → toggl2clockify

pieye / toggl2clockify

Licence: Apache-2.0 license
Migrate data from toggl to clockify

Programming Languages

python
139335 projects - #7 most used programming language
Batchfile
5799 projects

Projects that are alternatives of or similar to toggl2clockify

gnome-pomodoro-tracking
Connect your Pomodoros to popular time tracking services (@odoo, @clockify, @toggl).
Stars: ✭ 16 (-23.81%)
Mutual labels:  toggl, clockify
Migrate2Postgres
Easily migrate from other DBMSs to PostgreSQL
Stars: ✭ 47 (+123.81%)
Mutual labels:  migration, migration-tool
minutes
Sync worklogs between multiple time trackers, invoicing, and bookkeeping software.
Stars: ✭ 19 (-9.52%)
Mutual labels:  toggl, clockify
butterfly
Application transformation tool
Stars: ✭ 35 (+66.67%)
Mutual labels:  migration, migration-tool
maildir2gmail
Maildir 2 Gmail
Stars: ✭ 14 (-33.33%)
Mutual labels:  migration, migration-tool
hasura-metadata-patcher
CLI tool to patch Hasura metadata json file. Helps to organize complex CI/CD flows through different environments.
Stars: ✭ 14 (-33.33%)
Mutual labels:  migration, migration-tool
mgmigrate
mgmigrate is a tool for migrating data from MySQL or PostgreSQL to Memgraph and between Memgraph instances.
Stars: ✭ 17 (-19.05%)
Mutual labels:  migration, migration-tool
mongration
MongoDB data migration tool for Spring Boot projects
Stars: ✭ 21 (+0%)
Mutual labels:  migration, migration-tool
alembic utils
An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
Stars: ✭ 105 (+400%)
Mutual labels:  migration
camunda-bpm-migration
Fluent Java API for Camunda Platform 7 process instance migration
Stars: ✭ 18 (-14.29%)
Mutual labels:  migration
set-env-to-github env
A migration tools convert `::set-env`/`::set-output`/`::save-state` to $GITHUB_ENV/$GITHUB_OUTPUT/$GITHUB_STATE on GitHub Actions.
Stars: ✭ 27 (+28.57%)
Mutual labels:  migration
r2dbc-migrate
R2DBC database migration tool & library
Stars: ✭ 83 (+295.24%)
Mutual labels:  migration
MigrateGitlabToGogs
Migrate repositories from Gitlab to Gogs or Gitea
Stars: ✭ 49 (+133.33%)
Mutual labels:  migration
yii2-console-migration
yii2命令行中使用migration备份和还原数据库
Stars: ✭ 35 (+66.67%)
Mutual labels:  migration
maintenance job
Mechanism to run testable one-off jobs in Rails at deploy time to manipulate data
Stars: ✭ 27 (+28.57%)
Mutual labels:  migration
laravel-migrate-check
An artisan command to check for pending migrations with proper exit code
Stars: ✭ 53 (+152.38%)
Mutual labels:  migration
sqlize
sql migration schema generate from models
Stars: ✭ 47 (+123.81%)
Mutual labels:  migration
django-wordpress-parser
Wordpress eXtended RSS Parser (in Python for Django)
Stars: ✭ 18 (-14.29%)
Mutual labels:  migration
couchmove
Java data migration tool for Couchbase
Stars: ✭ 36 (+71.43%)
Mutual labels:  migration
modoboa-imap-migration
An extension to ease the migration between 2 IMAP servers using offlineimap
Stars: ✭ 14 (-33.33%)
Mutual labels:  migration

toggl2clockify

Migrate data from toggl to clockify

No warranty that the tools works as expected. Read the following lines CAREFULLY and TEST it on a non productive system!

Quick start

Migration consists of six steps (which are described in detail below):

  1. Prepare clockify workspace
  2. Prepare Toggl workspace
  3. Modify config.json
  4. Run the migration tool bin/toggl2clockify.exe (or python toggl2clockify.py on other platforms)
  5. After the import go through log.txt and search for "WARNING" entries (if you're unsure post a bug report)
  6. Finalize migration (archive projects in clockify which were archived on toggl) by running bin/toggl2clockify.exe --skipClients --skipProjects --skipEntries --skipTags --doArchive

Migration Guide

Prepare clockify workspace

Prepare clockify workspace

Prepare Toggl workspace

Prepare Toggl workspace

Configure import process

Open the file config.json. The file already contains all required keywords (TogglKey , ClockifyKeys, ClockifyAdmin and StartTime).

Configure toggl and clockify API keys

You need your toggl API key (https://toggl.com/app/profile) and the clockify API keys of all users to be migrated (every clockify user has to open https://clockify.me/user/settings ). Put the keys in the file config.json.

Suppose your toggl API key is ABCDEF and you want to migrate yourself (clockify API key 123456) and a second user (clockify API key XYZCDF).

{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF"]
}

Configure clockify admin mail address

You have to configure the mail address of one clockify workspace admin. Suppose you have admin rights on the clockify workspace and your clockify account mail is [email protected]

{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF"],
  "ClockifyAdmin": "[email protected]"
}

Configure start time of import

Enter the start time from when you want to import your entries. This string is parsed by python's dateutil parser (details: https://dateutil.readthedocs.io/en/stable/parser.html).

Some valid examples:

  • "2012-01-19"
  • "2012-01-19 17:21:00"
  • "2012-01-19 17:21:00 CST"
{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF"],
  "ClockifyAdmin": "[email protected]",
  "StartTime": "2019-01-19"
}

Configure end time of import (optional)

Entering an end time until when you want to import entries is optional. If not given, all time entries until NOW are imported. The EndTime string follows the same formation rules as the StartTime string.

{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF"],
  "ClockifyAdmin": "[email protected]",
  "StartTime": "2019-01-19"
  "EndTime": "2019-05-14"
}

Configure workspace of import (optional)

The last step is to configure the workspace to be imported. You can also give a list of multplie workspaces, but this is an untested feature. Make sure that the toggl and clockify workspace names match exactly (no spaces, UPPER/lower case).

{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF"],
  "ClockifyAdmin": "[email protected]",
  "StartTime": "2019-01-19",
  "Workspaces": ["myWorkspace"]
}

Clockify fallback user mail

If there are time entries in the toggl workspace that don't match to any clockify user, you can define a fallback user mail on the clockify workspace. All time entries with no clockify user match will than be assigned to this user on the clockify workspace. Let's assume that the fallback user has a mail address [email protected] and a ClockifyKeys "ABCDEF", than you have to add the Clockify API key to the ClockifyKeys and the mail address of the fallback user to the key FallbackUserMail:

{
  "TogglKey": "ABCDEF",
  "ClockifyKeys": ["123456", "XYZCDF", "ABCDEF"],
  "ClockifyAdmin": "[email protected]",
  "StartTime": "2019-01-19",
  "FallbackUserMail": "[email protected]",
  "Workspaces": ["myWorkspace"]
}

Run the import

Regular import

If you're on windows you can run the file directly:

bin/toggl2clockify.exe

Or through python by installing the requirements, and then running it.

pip install -r requirements.txt
python main.py

Make sure you have a file called config.json in the folder from where you invoke the program.

Run

bin/toggl2clockify.exe --help 

to get a list of all supported commands.

You can run the tool as often as you wish. All time entries, projects, clients and tags are checked for existance before being added to the clockify workspace

Remarks on archived projects

If you have archived projects in the toggl workspace, use the flag --doArchive at the very end when you are sure, that all data has been migrated successfully

Your very last invokation of the import tool should be

bin/toggl2clockify.exe --skipClients --skipProjects --skipTasks --skipEntries --skipTags --doArchive

When you try to add time entries for projects, which are already archived in clockify, the tool gets messed up:

  • the entries are added without project reference
  • the "entry exists" check doesn't work and the time entries will be added as duplicates on each invokation of the tool

Before you start the migration, you should unarchive all clockify projects first.

Check the log

The tool creates a file log.txt parse the contents for "INFO" and "WARNING" entries. Make sure to understand them or post a bug report if things don't work as expected.

What is migrated

  • All clients of the workspace

  • All tags of the workspace

  • The following project attributes are migrated:

    • name

    • client

    • isPublic

    • billable

    • color

    • membership

    • NOT MIRGATED: hourlyRate, estimate

  • The following time entry attributes are migrated:

    • start

    • billable

    • description

    • projectID

    • userID

    • end

    • tagIds

    • NOT MIGRATED: timeInterval (not sure what purpose this serves), isLocked

    • BUG: Duplicate entry detection has a bug unless setting timezone to "Z"

  • All tasks of the workspace

  • User groups

Clearing the workspace

You can use the --wipeAll flag to clear the entire workspace. This is useful for development/testing, since the duplication entry detection isn't perfect. This restores the workspace to a blank slate without having to create a new workspace. The program will wipe everything first, then immediately exit.

Development

After running pip install -r requirements.txt, run:

pre-commit install

This adds a small script that checks your code before commits. It will prevent you from committing unless your code passes formatting and pylint.

To run the commands individually:

Use black for auto-formatting

pip install black
black .

Use pylint_runner for linting code

pip install pylint
pip install pylint-runner
pylint_runner

Building a new version

For windows, simply navigate to the builder folder and run build_windows.bat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].