Giter Site home page Giter Site logo

weather_informer's Introduction

README

Disclaimer: Not for production use

Disclaimer

I am making this project for the purpose of getting familiar with Ruby and RoR. However, feel free to use it as you wish.

Description

Simple weather forecast informer. Will send a notification if weather conditions are met.

  • Call meteo.lt API to get weather data (Don't abuse their API, they have 20k daily limit. 24 requests per day should be more than enough)
    • Save data to database
  • Run periodic worker which checks if data matches specified conditions
    • Ex: if it will rain today โ€“ send a notification
      • Email
      • Telegram bot
  • Telegram API to ask about current conditions or forecast
    • . Will return a list of options to choose from.
      • Kada lis?, which returns nearest rain forecast
      • Atnaujink duomenis, which will update data bot_example.png
    • orai Will return warnings about today's weather

Changelog

1.1 version

Default timezone for TelegramBot is set to Vilnius. Telegram bot will respond in that timezone

Overview

Version 1

overview.png

Accompanying blog post for version 1

Running

  • Locally
    • docker-compose up -d for Rails, Redis & Sidekiq
    • Database is SQLite, so no need to run anything

Configuration

  • EDITOR="code --wait" rails credentials:edit
  • emails_to_notify: ["email@to_deliver.local"] #where to deliver notifications
    smtp: 
      user_name: "apikey"
      password: "SG...." #sendgrid api key
      from: "from@to_deliver.local" #sendgrid verified email
    telegram_api_key: "placeholder_key"
    telegram_chats_to_notify: ["chat_id"]
    telegram_allowed_chat_ids: ["chat_id"]

weather_informer's People

Contributors

benetis avatar

Watchers

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