From 71222aa59c2894ac4ab17f321c82036d00f878c8 Mon Sep 17 00:00:00 2001 From: "Fredrick W. Warren" Date: Sun, 29 Dec 2024 08:50:37 -0700 Subject: [PATCH] convert newlines in descrption field to \n --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5c4f23b..c3e761d 100755 --- a/main.py +++ b/main.py @@ -140,7 +140,7 @@ def process_day(events, year, month, day, day_events): start = datetime(year, month, day, event_item[0], event_item[1]) finish = datetime(year, month, day, event_item[2], event_item[3]) debug_print(f" {start:%H:%M}-{finish:%H:%M} {event_item[6]:25} {event_item[4]:11} {event_item[5]:16} {event_item[7]:70.70}", DEBUG) - event = create_event(event_item[6], event_item[4], event_item[5], event_item[7], start, finish) + event = create_event(event_item[6], event_item[4], event_item[5], event_item[7].replace("\n","\\n"), start, finish) events.append(event) return events @@ -173,7 +173,7 @@ def process_months(MONTHS, monthly_events, year): def main(): """create csv file""" events = process_months(MONTHS, monthly_events, YEAR) - events = sort_events(events) + # events = sort_events(events) write_calendar(events) sys.exit(0)