Giter VIP home page Giter VIP logo

canteenie's Introduction

canteenie logo

canteenie

A small python script that prints today's canteen/mensa menu on console using openmensa API.

Requirements

The following python 3 modules are needed:

Installation

  • Install modules on Ubuntu/Debian: $ apt-get install python3-termcolor
  • Install openmensa-api with pip: $ pip3 install openmensa-api
  • Clone this git repository: $ git clone https://github.com/dreieinhalb/canteenie.git

Usage

$ ./canteenie.py --help
usage: canteenie [-h] [-m {lmpl,sued,isch}] [-i ID] [-d DATE] [-l]
                 [-p {employees,students,others}] [--no-xmascc]

A small python script that prints today's canteen/mensa menu for FAU on
console.

optional arguments:
  -h, --help            show this help message and exit
  -m {lmpl,sued,isch}, --mensa {lmpl,sued,isch}
                        for which mensa? (lmpl: Erlangen Langemarckplatz
                        (default), sued: Erlangen Süd, isch: Nürnberg Insel
                        Schütt)
  -i ID, --id ID        for which ID on openmensa.org?
  -d DATE, --date DATE  for which date (YYYY-MM-DD)?
  -l, --lite            disable ascii art header and color (lite view)
  -p {employees,students,others}, --price {employees,students,others}
                        prices for which group? (employees (default),
                        students, others)
  --no-xmascc           disable christmas closing countdown

Output example

$ ./canteenie.py
                                     
         __  __                      
        |  \/  | ___ _ __  ___  __ _ 
        | |\/| |/ _ \ '_ \/ __|/ _` |
        | |  | |  __/ | | \__ \ (_| |
        |_|  |_|\___|_| |_|___/\__,_|
                                     
        //////// 08.08.2018 /////////

        (1) Maultaschen mit Gemüse-Füllung auf Ratatouille [V] 3,23 €
        (2) Pizza Vier Käse [V] 4,33 €
        (3) Apfel-Nuss Couscous mit lackierten Hähnchenbruststreifen [G] 3,38 €
        (4) Seehecht m. Schwarzwurzelragout u. Bandnudeln [VF] 4,89 €
        (5) Pizza Speziale [SG] 4,99 €

        V=Vegetarisch S=Schwein R=Rind G=Geflügel F=Fisch 

canteenie's People

Contributors

bedivere avatar dreieinhalb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

canteenie's Issues

wrong date on weekend

canteenie shows the wrong date on weekends. It don't uses the date from mensa page but today's date. On weekends (sat, sun) the mensa page shows the menu for monday.

endless while loop

canteenie runs in a endless while loop in the following two scenarios:

  • two meals with the same number
  • meal without number

for preventing this bug maybe add a second counter to the while loop and break the loop after for example 10 meals because there won't be more than 10 meals

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.