Giter Site home page Giter Site logo

tgtg_watchbot's Introduction

WatchBot for "too good to go"

Problem

This project helps me to no longer miss my favorite offers at "too good to go" (also known as tgtg)!

"Too good to go" is a platform, where stores can offer bags of leftover food, that they otherwise need to throw away. The stores save a little bit of money, we get goods, that already have a few quirks, but are still consumable. Most importantly, this reduces food waste and thereby is good for the planet. In my neighborhood, e.g. a supermarket offers fruits & vegetables and a bakery offer their leftover bread at the end of the day.

However, the tgtg-app does often not notify me in time when my favorite goods are in stock. Since the offers are popular and limited, I regularly miss the time to click and collect the items. There are no settings for notifications in the app.

Solution

This application scrapes info from the tgtg-app and sends me a notification via a Telegram bot as soon as my favorite items are available. The application runs in the cloud via heroku. Here is a screenshot of the application:

Telegram Screenshot

Tgtg API

There is a library wrapped around the API of the tgtg-app. You can find the library and a short documentation here.

Telegram bot

I used Telegram as the service to notify me, because they are quite supportive for adding your own bots to the platform and provide a rich API. This article provides a quick introduction into sending Telegram messages with python.

Heroku Deployment

Heroku is a platform to run small web applications in the cloud for free. This article gives a short description on how to deploy a python script on Heroku. Additionally, I used config variables to hide my credentials in the project. These variables are explained here in the heroku documentation.

tgtg_watchbot's People

Contributors

aukijuandiaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tgtg_watchbot's Issues

Total newbie

I know how to deploy it on Heroku and use telegram bot, however I cannot get creditentials for TGTG and I am not sure if I get them should I put it in config.json?, how to do it? When I use python3 watch_script.py i get response "Nie mo". @kacpi2442

Missing Open Source License

Hi @AukiJuanDiaz,

I recently forked am_bot repository, which is a fork of your repository. What I currently miss is an appropriate open source license that explicitly allows usage and distribution of your source code. It would be great if you can add such a license.

Thanks

Total newbie

I would like to use it on some free cloud server (aws??), Can anybody babystep the process for me?

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.