Giter Club home page Giter Club logo

afb-notifier's Introduction

afb-notifier

Repo for Code@LTH's intro lecture and code along: https://docs.google.com/presentation/d/1rV5IPzBiFoe-DPaGTZztfFuZ4lO70y6T5YRnIyjii4k/edit?usp=sharing

Supervise AFBostäder programmatically to find your dream student housing.

Setup

  • Install Python

Then in the terminal run:

$ pip3 install virtualenv
$ virtualvenv venv
$ ./venv/bin/activate
(venv) $ pip3 install -r requirements.txt

If you are on Windows I suggest setting up Linux-subsystem. Then check this for the cronjob: https://scottiestech.info/2018/08/07/run-cron-jobs-in-windows-subsystem-for-linux/

Run

(venv) $ python3 -i notifier.py # interpreter for development and debugging
(venv) $ python3 notifier.py    # run script

Setup mailer

  1. Go to: https://console.cloud.google.com/
  2. Go to "Marketplace"
  3. Search for "GMail API"
  4. Enable "GMail API"
  5. Go to "Gmail API" -> "Credentials"
  6. Create a "OAuth Client ID" credential, make sure to select "Desktop App"
  7. Download the credential and save in the project directory, for example as "credentials.json".

Setup cron-job

  1. Modify run.sh to include your path, hint use pwd in the terminal.
  2. Run crontab -e and paste the following in, again with correct path:
*/30 * * * * <your_path>/run.sh > /tmp/afb-notifier-log.txt 2> /tmp/afb-notifier-errors.txt

Links

afb-notifier's People

Contributors

funrep avatar

Stargazers

 avatar  avatar

Watchers

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