Coder Social home page Coder Social logo

harvest_annoyer's Introduction

harvest_annoyer

Script to check whether a Harvest timer is running, and trigger a notification if not

The script will ping Harvest (every 5 minutes by default) to see if you have a timer running. If you don't, it will trigger an event which you can set up in IFTTT. A variable number of events can be set up to increase the annoyance level of the notification you receive depending on how long it's been since a timer has been running.

For example, in my current setup, at 5 minutes without a timer, I receive a push notification. 10 minutes: a text. 15 minutes: a phone call

To get up and running, plug your credentials into the init, replacing the placeholders.

The required credentials are:

  • Your organizations' Harvest URL
  • Your login email
  • Your login password

This script is set up to trigger an IFTTT event using the Maker channel. You can replace this with your own notification mechanism, but the required items for triggering IFTTT are:

  • ifttt_key: Your IFTTT Maker Channel Key

  • ifttt_event: An event prefix for the events that fire. For example, if my events are 'harvest_tracking_1', 'harvest_tracking_2', 'harvest_tracking_3', the ifttt_event should be 'harvest_tracking'

  • num_events: The number of events you've set up in IFTTT with this naming scheme

  • frequency: How often the script will check to see if a timer is running. Currently set to 300 (5 minutes)

Once set up, just run by calling the file from the terminal, python harvest_annoyer.py

Currently this uses a scheduler. It can be changed to use a cron, but this method required the least set up time for getting this set up for others.

This script is based off of Lionhearts Python wrapper for the Harvest API and this article from Matt Henderson

harvest_annoyer's People

Contributors

tomharrigan 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.