derhasi/toggl2redmine

This package is abandoned and no longer maintained. The author suggests using the undpaul/toggl2redmine package instead.

Command line tool to sync toggl time entries to redmine

0.4.0 2017-07-11 10:44 UTC

This package is not auto-updated.

Last update: 2021-06-01 15:32:41 UTC


README

PHP CLI tool for syncing toggl with redmine.

Latest Stable Version Total Downloads Latest Unstable Version License

Time entry sync

Currently only time-entry-sync is available.

  • One-way-synchronisaton from toggl to Redmine
  • Mapping of Toggl tag name with Redmine
  • Sync state is marked as tag #synched in Toggl

Installation

The installation is simple by using composer. After installing composer you can either install the command globally or within a project.

Global

In the global installation toggl2redmine will be available as a command line tool.

  • Run composer global require derhasi/toggl2redmine to install globally.
  • Add export PATH=~/.composer/vendor/bin:$PATH to your .bashrcor .profile

After the installation you should be able to run toggl2redmine time-entry-sync ... from anywhere.

Local

You can run composer require derhasi/toggl2redmine in any composer enabled project to add this project as a dependency.

Usage

You can run the global or local command by appending options, use a configuration file or use both. A command line argument or option will allways override a setting from the toggl2redmine.yml.

Global: toggl2redmine.php time-entry-sync ...

Local: ./toggl2redmine time-entry-sync ...

Command line arguments and options

Usage:
 time-entry-sync [--workspace="..."] [--fromDate="..."] [--toDate="..."] [--defaultActivity="..."] redmineURL redmineAPIKey tooglAPIKey

Arguments:
 redmineURL            Provide the URL for the redmine installation
 redmineAPIKey         The APIKey for accessing the redmine API
 tooglAPIKey           API Key for accessing toggl API

Options:
 --workspace           Workspace ID to get time entries from
 --fromDate            From Date to get Time Entries from (default: "-1 day")
 --toDate              To Date to get Time Entries from (default: "now")
 --defaultActivity     Name of the default redmine activity to use for empty time entry tags (default: "")

Configuration

You can place a toggl2redmine.yml in your current working directory for local defaults. For global defaults you can place it at ~/.toggl2redmine/toggl2redmine.yml. Attention: local and global defaults will not be merged. The local default always take precedence over the global defaults, in the case it exists.

You can find a template for toggl2redmine.yml at default.toggl2redmine.yml. Make sure to rename it to toggl2redmine.yml!

For example, for adding the default config template to the global folder you can simply type:

mkdir ~/.toggl2redmine
curl https://raw.githubusercontent.com/derhasi/toggl2redmine/master/default.toggl2redmine.yml > ~/.toggl2redmine/toggl2redmine.yml