Browse Source

make separate field for begin and localized begin

master
rra 4 months ago
parent
commit
e3c1bd6fd6
  1. 3
      event_feed.py
  2. 3
      event_template.md

3
event_feed.py

@ -58,7 +58,8 @@ for event in list(cal.events):
'name':event.name,
'created':event.created.format(),
'description': event.description,
'begin': '           '.join(localized_begins), #non-breaking space characters to defeat markdown
'localized_begin': '           '.join(localized_begins), #non-breaking space characters to defeat markdown
'begin': event.begin.format(),
'end': event.end.format(),
'duration': date.compress(event.duration),
'location': event.location

3
event_template.md

@ -1,11 +1,12 @@
---
title: "{{ event.name }}"
date: "{{ event.begin}}" #2021-06-10T10:46:33+02:00
date: "{{ event.begin }}" #2021-06-10T10:46:33+02:00
draft: false
category: "calendar"
event_begin: "{{ event.begin }}"
event_end: "{{ event.end }}"
duration: "{{ event.duration }}"
localized_begin: "{{ event.localized_begin }}"
{% if event.location %}
location: "{{ event.location }}"
{% endif %}

Loading…
Cancel
Save