|Build Status| |Latest PyPI version| |Python versions| |Development status| |Documentation|
This small python library helps you to work with
OpenMensa <http://openmensa.org/>
__ by:
The feed module <#generating-openmensa-feeds>
makes it very easy to generate a valid OpenMensa Feed V2 <http://doc.openmensa.org/feed/v2/>
. This is in production use for the majority of canteens in OpenMensa <http://openmensa.org/>
__.openmensa <http://openmensa.org/>
__. (in development)More information about OpenMensa and all possibilities for developers <http://doc.openmensa.org/>
__.
|Documentation|
Documentation is hosted by ReadTheDocs <https://readthedocs.org>
: for the Full documentation about PyOpenMensa <https://pyopenmensa.readthedocs.org>
The documentation is created with Spinx <http://sphinx-doc.org/>
__ and the documentation source code can be found in the doc/ directory.
You need Python <http://www.python.org/>
__ 2.6, 2.7 or >=3.2.
Install pyopenmensa:
via pypi
.. code:: bash
pip install pyopenmensa
via git
.. code:: bash
git clone git://github.com/mswart/pyopenmensa``
Create Feed builder:
.. code:: python
from pyopenmensa.feed import LazyBuilder canteen = LazyBuilder() # canteen container
Add feed data (PyOpenMensa can do basic parsing and converting):
.. code:: python
from datetime import date canteen.addMeal(date(2013, 3, 4), 'Hauptgericht', 'Gulasch', notes=['Mit Süßstoff', 'Schwein'], prices={'student': 203, 'other': '3,05 €'} ) canteen.setDayClosed('5.3.2013')
Receive XML Feed:
.. code:: python
print(canteen.toXMLFeed())
And you have a valid OpenMensa V2 Feed <http://doc.openmensa.org/feed/v2/>
__:
.. code:: xml
<?xml version="1.0" encoding="UTF-8"?>
git checkout -b my_markup
)git commit -am "Added Snarkdown"
)git push origin my_markup
)Pull Request <https://github.com/mswart/pyopenmensa/pulls>
__LGPL License
Copyright (c) 2012-2015 Malte Swart. LGPL license, see LICENSE for more details.
.. |Build Status| image:: https://travis-ci.org/mswart/pyopenmensa.png?branch=master :target: https://travis-ci.org/mswart/pyopenmensa :alt: Build Status
.. |Latest PyPI version| image:: https://img.shields.io/pypi/v/pyopenmensa.svg :target: https://pypi.python.org/pypi/pyopenmensa :alt: Latest PyPI version
.. |Python versions| image:: https://img.shields.io/pypi/pyversions/pyopenmensa.svg :target: https://pypi.python.org/pypi/pyopenmensa :alt: Supported Python Versions
.. |Development status| image:: https://img.shields.io/pypi/status/pyopenmensa.svg :target: https://pypi.python.org/pypi/pyopenmensa :alt: Development status
.. |Documentation| image:: https://readthedocs.org/projects/pyopenmensa/badge/?version=latest :target: https://pyopenmensa.readthedocs.org/en/latest/?badge=latest :alt: Documentation