Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.69 KB

README.md

File metadata and controls

60 lines (39 loc) · 1.69 KB

stw2openmensa

Deprecation notice

From 2016 to August 2020, Studierendenwerk Münster provided meal data as XML files (see the discussion here) but they have since stopped. Canteen data is now only available via the "My Mensa" platform.

If want to use the canteen data in a machine readable format and are looking for an alternative, take a look at the mymensa2openmensa project (see issue #15).

About

stw2openmensa is a Python script that converts canteen meal data from Studierendenwerk Münster XML to OpenMensa Feed v2 XML format.

Installation

Configuration

config.py contains a few settings that you can change, the most important being output_dir where the output data will be written to.

Quick start

Install dependencies and run the script.

pip install -r requirements.txt
python parser.py

Using virtualenv

Prepare your virtual environment:

sudo pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate

Activate your virtual environment and run the parser:

source venv/bin/activate
python parser.py
deactivate

Cronjob example using virtualenv:

Executes monday through saturday at 07:00

0 7 * * 1-6 /home/you/mensaparser/venv/bin/python /home/you/mensaparser/parser.py

Todo

  • Better checks for when a canteen is closed for the day (see issue #4)

License

Code in this repository is licensed under the MIT license.