Git Product home page Git Product logo

itu-canteen-cli's Introduction

EatIT CLI - What's on the menu today?

A python script that will tell you what is on the EatIT canteen's menu today.

The script will scrape the https://intranet.itu.dk/organisation/canteen, which it requires your ITU credentials to do. After it has scraped the data, it will save it to a sqlite local database, found at ~/.eatit.db in your system, in order to quickly query for today's menu for the rest of the week.

After Monday 08:00, the script will prompt for ITU credentials again, to scrape for the new week's menu. The sqlite database is deleted and recreated so it won't store outdated data.

Installation

You need the following packages to run the script: selenium, beautifulsoup, peewee. Run the following commands to install the libraries via pip.

$ pip install selenium

$ pip install beautifulsoup4

$ pip install peewee

You will also need to install the chromedriver (and the browser Google Chrome, if you don't have it already).

See here for installation of the chromedriver.

Running the program

After you have installed the required packages, you are ready to run your EatIT cli.

$ python eatit.py

The first time the program is run (and at the start of each week), it will take some time to scrape. After that, running the program will be super quick as it will query the sqlite database.

itu-canteen-cli's People

Contributors

banksdev avatar

Watchers

James Cloos 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.