lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit 8f83f1b38c108615e39c697c08f2172b8cafd8f8
parent ca157748d3414538d4861d0d9f7a2e4c63b071e6
Author: Fran├žois Revol <revol@free.fr>
Date:   Tue, 20 Mar 2018 11:26:29 +0100

lps_gen.py: Update the timeslot regex to make the name optional

Fixes ical generation.

Diffstat:
lps_gen.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lps_gen.py b/lps_gen.py @@ -119,8 +119,8 @@ class LPiCal(object): self.lp_year = str(lp_year) # Matches strings like '09:45 - 10:30: Lorem ipsum dolor sit.' - self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+):' - + r'\s*(.+\b)') + self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+)' + + r':?\s*(.+\b)?') # Matches strings like 'Saturday, March 19' self.month_day_re = re.compile(r'\w+,\s*([a-zA-Z]+)\s*(\d+)')