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

Kapalı
mmu_man rsd/master içindeki mmu_man/timeslot_re işlemelerini 1 ile birleştirmek istiyor
mmu_man 6 yıl önce olarak yorumlandı

This seems to fix the ical generation.

This seems to fix the ical generation.
siddharth ravikumar 6 yıl önce olarak yorumlandı
Sahibi

@mmu_man, Thanks for the patch!

Looking at the current year's program, the time slots that have a description are separated from the time interval by a -. Would it be possible to modify the time slot regex to accommodate this too?

Something like this:

self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+)'
                              r'\s*[:-]?\s*(.+\b)?')

will work.

@mmu_man, Thanks for the patch! Looking at the [current year's program](https://www.libreplanet.org/2018/program/), the time slots that have a description are separated from the time interval by a `-`. Would it be possible to modify the time slot regex to accommodate this too? Something like this: ```python self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+)' r'\s*[:-]?\s*(.+\b)?') ``` will work.
mmu_man 6 yıl önce olarak yorumlandı
Poster

The current regex will match anyway, but will eat the - as part of the name field, which is not used. Yeah the one you propose should work.

The current regex will match anyway, but will eat the - as part of the name field, which is not used. Yeah the one you propose should work.
siddharth ravikumar 6 yıl önce olarak yorumlandı
Sahibi

@mmu_man, Merged your patch and made some minor tweaks. Thanks again!

@mmu_man, Merged [your patch](commit/8f83f1b38c108615e39c697c08f2172b8cafd8f8) and made some minor tweaks. Thanks again!
rsd 6 yıl önce kapattı
Birleştirme işlemini gerçekleştirmek için lütfen bu değişiklik isteğini tekrar açın.
Giriş yap bu konuşmaya katılmak için.
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.