Giter Site home page Giter Site logo

jakobwenzel / node-toogoodtogo-watcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marklagendijk/node-toogoodtogo-watcher

0.0 1.0 0.0 82 KB

Node.js cli tool for monitoring your favorite TooGoodToGo businesses.

License: MIT License

JavaScript 97.40% Dockerfile 2.60%

node-toogoodtogo-watcher's Introduction

node-toogoodtogo-watcher GitHub license npm Docker Cloud Build Status Docker Pulls

Node.js cli tool for monitoring your favorite TooGoodToGo businesses. Notifications are shown when the stock of any of the businesses changes. The following notification types are supported:

  • Desktop notification
  • Console output
  • Telegram chat message

See below for Docker usage.

Installation

  1. Install Node.js 8.x or higher (Windows | Linux | OSx).
  2. npm install -g toogoodtogo-watcher
  3. toogoodtogo-watcher config. Fill in your TooGoodToGo account details. Optionally enable / disable certain notifications. See Configuring Telegram notifiations for instructions on setting up the Telegram notifications.
  4. toogoodtogo-watcher watch

CLI documentation

Usage: toogoodtogo-watcher <command>

Commands:
  config        Edit the config file.
  config-reset  Reset the config to the default values.
  config-path   Show the path of the config file.
  watch         Watch your favourite busininesses for changes.

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Displaying the notifications in the Windows notification center

By default Windows doesn't display the notifications in the notification center. You can enable this by doing the following steps.

  1. Go to 'notifications & actions settings' (Windows key, type 'notifications', enter)
  2. Click on the 'toast' app at the bottom of the screen.
  3. Enable the 'show in action center' checkbox.

Configuring Telegram notifiations

  1. Open a Telegram chat with BotFather.
  2. Follow the instructions to create your own bot.
  3. Copy the token and enter it in the configuration via toogoodtogo-watcher config, and set enabled to true.
  4. Start the application toogoodtogo-watcher watch
  5. Click the t.me/BOTNAME link from the BotFather chat message.
  6. Press BEGIN.
  7. Your bot should greet you, and show a notification about your favorites. Note: the bot will show the favorites which you configured. Multiple people can connect to the bot to get updates about these favorites.

Docker

Create a directory config and copy the config.defaults.json to config/config.json. See above for instructions on how to configure the application.

Docker run

docker run \
 --name toogoodtogo-watcher \
 -v /full/path/to/config:/home/node/.config/toogoodtogo-watcher-nodejs \
 marklagendijk/toogoodtogo-watcher`

Docker Compose

docker-compose.yaml:

version: "3"
services:
  toogoodtogo-watcher:
    image: marklagendijk/toogoodtogo-watcher
    restart: unless-stopped
    volumes:
      - ./config:/home/node/.config/toogoodtogo-watcher-nodejs

node-toogoodtogo-watcher's People

Contributors

dheckl avatar jakobwenzel avatar marklagendijk 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.