GithubHelp home page GithubHelp logo

rabume / kimai-notifier Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

A simple Go application to track time and receive notifications when you exceed the daily working hours threshold in the Kimai Time Tracking System.

Go 100.00%

kimai-notifier's Introduction

๐Ÿ•’ Kimai Notifier

Language: Go License: MIT

๐Ÿš€ A simple Go application to track time and receive notifications when you exceed the daily working hours threshold in the Kimai Time Tracking System.

Idea

I had the idea to create this app because I always forget the time. I wanted to create a simple app that would notify me when I exceed the daily working hours threshold. I use the Kimai Time Tracking System to track my time, so I decided to use the Kimai API to fetch the total hours worked for the current day.

Overview

The Kimai Notifier is a lightweight Go application designed to interact with the Kimai Time Tracking System's API. It fetches the total hours worked for the current day from the Kimai API at a predefined interval (5 minutes by default). If the total hours exceed a certain threshold (e.g., 8 hours), it sends a notification (user-defined) to alert the user to take a break.

Dependencies

The following dependencies are required to build and run the Kimai Notifier:

  • Go (Version 1.14 or later)
  • GitHub.com/go-resty/resty/v2]
  • Linux (Tested on Arch Linux and Pop!_OS)
  • notify-send (Tested with version 0.8.2)

Installation

  1. Install Go: Make sure you have Go installed on your system. You can download and install it from the official website: https://golang.org/

  2. Install the Kimai Notifier: Clone the repository and build the executable. The executable will be created in the current directory.

git clone https://github.com/rabume/kimai-notifier.git
cd kimai-notifier
go get github.com/go-resty/resty/v2
go build

Configuration

The config.json file contains the configuration for the Kimai Notifier. The following parameters can be configured:

  • apiEndpoint: The URL of the Kimai API.
  • username: The username of the Kimai user.
  • token: The API token of the Kimai user.
  • interval: The interval (in minutes) at which the Kimai Notifier will fetch the total hours worked for the current day from the Kimai API.
  • threshold: The threshold (in hours) at which the Kimai Notifier will send a notification to alert the user to take a break.

kimai-notifier's People

Contributors

rabume avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.