diff --git a/src/twomartens/calendarsync/calendarsync.py b/src/twomartens/calendarsync/calendarsync.py index e2db05e..c5fce4b 100644 --- a/src/twomartens/calendarsync/calendarsync.py +++ b/src/twomartens/calendarsync/calendarsync.py @@ -72,7 +72,10 @@ def sync(calendar_url: str, event_collection_path: str) -> None: end: datetime.datetime = event.end end_str = end.isoformat(sep=' ') event_content = event_content.replace('', end_str) - event_content = event_content.replace('', event.location) + location_info = event.location.split(sep=':') + event_content = event_content.replace('', location_info[0]) + if len(location_info) == 2: + event_content = event_content.replace('
', location_info[1]) event_filename = begin.date().isoformat() + '-' + event.name.replace(' ', '_') + '.markdown' with open(event_collection_path + event_filename, 'w', encoding='utf-8', newline='\n') as event_file: diff --git a/src/twomartens/calendarsync/event_template.markdown b/src/twomartens/calendarsync/event_template.markdown index b024f19..025035c 100644 --- a/src/twomartens/calendarsync/event_template.markdown +++ b/src/twomartens/calendarsync/event_template.markdown @@ -5,4 +5,5 @@ date: start_date: end_date: location: +address:
---