convert newlines in descrption field to \n

This commit is contained in:
Fredrick W. Warren 2024-12-29 08:50:37 -07:00
parent 0b97ad1e49
commit 71222aa59c

View File

@ -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)