Skip to content

Integration between TimeTagger and ActivityWatch so you can actually track your tagged activities on activity watch. - TimeTagger Watcher

License

Notifications You must be signed in to change notification settings

regismesquita/timetagger_watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TimeTagger Watcher

Introduction

TimeTagger Watcher is a simple Python script designed to track your current task from TimeTagger and log it to an ActivityWatch bucket. This seamless integration can help you monitor your productivity and understand how your time is being allocated.

Prerequisites

Before running the script, please ensure you have the following installed on your system:

  • Python 3.x
  • Requests package: pip install requests
  • ActivityWatch Client package: pip install aw-client

Setting Up

Set environment variables for your TimeTagger URL, token, and optionally, the log level:

export TIMETAGGER_URL="https://yourtimetagger.url/api/v2/records"
export TIMETAGGER_TOKEN="yourtimetaggertoken"
export LOG_LEVEL="INFO" # Default is WARNING, options: DEBUG, INFO, WARNING, ERROR, CRITICAL

For local or self-signed certificates, you may disable SSL verification in the script by keeping VERIFY_CERTIFICATE = False.

Basic Usage

To start tracking your TimeTagger tasks with ActivityWatch, simply run the timetagger_watcher.py script:

python timetagger_watcher.py

Example

Assuming your TimeTagger URL is https://timetagger.example.com/timetagger/api/v2/records and you have received a token, the setup would be:

export TIMETAGGER_URL="https://timetagger.example.com/timetagger/api/v2/records"
export TIMETAGGER_TOKEN="your_unique_token_here"
export LOG_LEVEL="INFO"

After setting these environment variables, run the script:

python timetagger_watcher.py

The log level INFO allows you to see informative messages providing insight into the script's operations and any issues encountered.

Note

This script is meant to run continuously. If you wish to execute it in a more robust environment (e.g., background service), you may need to take additional steps to daemonize the script or monitor it with a tool like supervisor or systemd.

Contribution

Your contributions to improve TimeTagger Watcher are welcome! Please feel free to fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License. Please see the LICENSE.md file for details.

About

Integration between TimeTagger and ActivityWatch so you can actually track your tagged activities on activity watch. - TimeTagger Watcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages