Room bookings from LSF
======================
.. seealso:: Module :py:mod:`tutorplanner.input.lsf_parser`
At the TU Berlin, there is a system called LSF_ (Lehre, Studium, Forschung) that contains the course catalog and the
room bookings of a course. The course owners can export the bookings in an XML format. The bookings might be in
multiple files.
.. The setting of the LSF path is ``paths.lsf``.
Parsing details
---------------
An excerpt of a LSF XML file looks like:
.. code-block:: xml
123456
10:00
12:00
18.10.2016
18.10.2016
Einzel
23456
1907
Di
2
2
MAR 4.062
Although it is named ````, the tag contains a single event. The same applies to ````.
As you can see, the language of the XML file is a mix of German and English with many abbreviations.
The fields we use are:
* ``TerBeginn``: start time
* ``TerEnde``: end time
* ``TerBeginDat``: start date
* ``TerEndeDat``: end date
* ``TerRhyth``: rhythm/frequency of the event:
* ``Einzel``: single event
* ``wöchentl``: weekly event
* ``14tägl``: biweekly event
* ``Block``: day period
* ``WoTag``: weekday
* ``Mo``, ``Di``, ``Mi``, ``Do``, ``Fr``, ``Sa``, ``So`` for Monday to Sunday
* ``RaumBez``: room name
We expect the weekday to be set for weekly and biweekly events.
.. note::
You should never write the LSF files by hand. Instead, use the :doc:`CSV format ` directly.
.. _LSF: https://www.tu-berlin.de/lsf/home/