chk1 / stw2openmensa

Convert canteen meal data from Studentenwerk Münster XML to OpenMensa Feed v2 XML format
http://openmensa.org/#14/51.9646/7.6159
MIT License
3 stars 2 forks source link
canteen openmensa parser xml

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

License

Code in this repository is licensed under the MIT license.