Skip to content

Taskwarrior hook to sync with Toggl Track

License

Notifications You must be signed in to change notification settings

astr0gator/togglwarrior

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

TogglWarrior

TogglWarrior is a hook for TaskWarrior to enable time tracking functionality. It automatically syncs the current task in TaskWarrior with a time entry in Toggl Track, a popular time tracking tool.

Features

  • Starts a new time entry in Toggl Track with the description and project of the started task in TaskWarrior
  • Stops the current time entry when the corresponding task is stopped in TaskWarrior
  • Modifies the project or description of the time entry in Toggl Track when it's modified in TaskWarrior

Note that TogglWarrior only syncs tasks with a non-empty project that exists within the Toggl Track workspace. Additionally, TogglWarrior only permits a single running synced task at any given time.

Requirements

Installation

  1. Clone the repository:
git clone https://github.com/polyntsov/togglwarrior.git
  1. Set up Toggl-CLI following the instructions in their repository: https://github.com/AuHau/toggl-cli#install

  2. Copy the on-modify-toggl-sync.py file to the TaskWarrior hooks directory:

cp on-modify-toggl-sync.py ~/.task/hooks/

Configuration

TogglWarrior relies on Toggl-CLI to interact with Toggl Track. Currently, Toggl-CLI's default ~/.togglrc is the only supported configuration file. If you have already set up Toggl-CLI, you don't need to do anything else.

You can create a configuration file by running any toggl command for the first time (it will prompt an interactive configuration). For example:

toggl projects ls

Usage

Start a task in TaskWarrior as you would normally:

task start task_id

TogglWarrior will automatically start a time entry in Toggl Track with the description and the project of task_id task.

When you stop this task in TaskWarrior:

task stop task_id

TogglWarrior will stop current time entry in Toggl Track.

If you modify the project or description of this task in TaskWarrior when it's running:

task modify task_id project:new_project description:new_description

TogglWarrior will modify current time entry in Toggl Track with the new project and/or description.

License

TogglWarrior is licensed under the MIT License. See LICENSE for more information.

About

Taskwarrior hook to sync with Toggl Track

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%