Giter Site home page Giter Site logo

fucg_smok's Introduction

Fucg smok

This repository holds python code which checks air quality forecast and optionally send email if the forecast is not optimistic.

How to use it

You need to have python 3.x (tested only on 3.7.5). Fucg smok uses Airly API, so you need to create account there and copy a token. Install all requirements: pip install -r requirements.txt Arguments can be checked with python main.py -h

usage: main.py [-h] [--percent PERCENT] [--receiver RECEIVER]
               [--subject SUBJECT] [--body BODY] [--time TIME] [--now NOW]
               token

positional arguments:
  token                 airly token used to authenticate Airly API calls

optional arguments:
  -h, --help            show this help message and exit
  --percent PERCENT, -p PERCENT
                        percent threshold above which one raise alarm
  --receiver RECEIVER, -r RECEIVER
                        email's receiver
  --subject SUBJECT, -s SUBJECT
                        email's subject
  --body BODY, -b BODY  email's body
  --time TIME, -t TIME  time when script should check forecast, default is
                        14:00
  --now NOW, -n NOW     executes once and exit the script

Example use:

python main.py token -p 150 -r [email protected] -s 'HO for the tomorrow' -b 'Due to hostile conditions I will work from home tomorrow' -t '13:00'

Future plans

Plans how to enhance functionalities of this script:

  1. Add possibility to register as windows service, and schedule check
  2. Remove hardcoded Cracow's location in airly request
  3. Add more email providers

fucg_smok's People

Contributors

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