Giter VIP home page Giter VIP logo

openmensa's Introduction

Open Mensa Feed v2 Generators

2015-2020, Georg Sauthoff [email protected]

This repository contains a few programs for generating menus in the Open Mensa Feed v2 format:

  • fra2openmensa.py - Frankfurt University Mensa page parser, also supports other Mensas of the operator

  • unibi2openmensa.py - Bielefeld University Mensa page parser, also supports other Mensas of the operator

  • fhrus2openmena.cc - FH-Rüsselsheim Mensa page parser, also supports several other Mensas of the Studentenwerk Frankfurt (outdated)

  • unibi2openmensa.cc - Bielefeld University Mensa page parser (outdated)

Design Choices

First Generation

For converting the HTML pages into the XML feed, they are first cleaned up into well-formed and conforming XHTML via HTML Tidy.

The generators are written in C++11 and heavily use XPath expressions.

Python is used for the update and test scripts instead of Shell, because of the library support. In that sense, Python is used as a replacement for shell scripting.

Second Generation

The second generation is written in Python.

Main motivating factor for choosing Python over a C++ solution: The html5lib Python package - which does a very good job normalizing real-world html into an XML tree. It certainly does a better job than libxml2 (via its html API) and HTML tidy. Also, in contrast to HTML tidy, it is actively maintained and obviously easier to integrate than an external program.

Besides that, the rich Python standard library doesn't leave much to be desired: high-level string processing, XML tree construction, XPath all is available without extra dependencies.

Dependencies

Licence

GPLv3+

openmensa's People

Contributors

gsauthof avatar

Watchers

 avatar  avatar  avatar

Forkers

sruettgers

openmensa's Issues

Support for vegetarian/vegan classification for Studentenwerk Frankfurt

Hey,

currently the meals from Studentenwerk Frankfurt don't show whether a meal is vegetarian or vegan (example).

This information can be found by parsing the title attribute of the <img> of a meal. The following values are used (possibly more): vegetarisch, Vegan, Alkohol, Rind, Schwein, MSC-Fisch. Some meals have several classifications, others have no <img> tag at all.

Please include functionality for parsing this information so I can use it in the OpenMensa API. Thank you :)

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.