From e6266515851fd4696e75c3d10420118985cf5db4 Mon Sep 17 00:00:00 2001 From: Ace Date: Sun, 17 Mar 2019 17:10:37 +0100 Subject: [PATCH] Disabled some non-required lines for iCalendar --- Calendar/E-Paper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Calendar/E-Paper.py b/Calendar/E-Paper.py index a1d059c..17bf097 100644 --- a/Calendar/E-Paper.py +++ b/Calendar/E-Paper.py @@ -234,10 +234,11 @@ def main(): if beginAlarmIndex >= 0: endAlarmIndex = decode.find('END:VALARM') decode = decode[:beginAlarmIndex] + decode[endAlarmIndex+12:] - fix_e_1 = decode.replace('BEGIN:VALARM\r\nACTION:NONE','BEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:') - fix_e_2 = fix_e_1.replace('BEGIN:VALARM\r\nACTION:EMAIL','BEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:') + #fix_e_1 = decode.replace('BEGIN:VALARM\r\nACTION:NONE','BEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:') + #fix_e_2 = fix_e_1.replace('BEGIN:VALARM\r\nACTION:EMAIL','BEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:') # print(fix_e_2) #print iCal as string - ical = Calendar(fix_e_2) + #ical = Calendar(fix_e_2) + ical = Calendar(decode) for events in ical.events: if events.begin.date().month is today.month: if int((events.begin).format('D')) not in events_this_month: