Add Substitle and differentiate by language

This commit is contained in:
Stefan Bethke 2025-11-18 19:33:57 +01:00
commit d734e94a7a

View file

@ -64,29 +64,39 @@ def create_schedule(sheet_file: str, schedule_file: str):
event_duration = row['Dauer']
print(f"name={name} day={row['Tag']} start={row['Am HT-Desk']} duration={row['Dauer']}")
guid = voc.tools.gen_uuid('{}-{}-{}'.format(row['Tag'], row['Am HT-Desk'], name))
start_time_hm = event_start.strftime('%H:%M')
if row['Sprache'] == "de":
title = descriptions[name]['Title DE']
subtitle = descriptions[name]['Subtitle DE']
abstract = descriptions[name]['Abstract DE']
else:
title = descriptions[name]['Title EN']
subtitle = descriptions[name]['Subtitle EN']
abstract = descriptions[name]['Abstract EN']
schedule.add_event(Event({
'id': index,
'guid': guid,
# ('logo', None,
'date': event_start.isoformat(),
'start': event_start.strftime('%H:%M'),
'duration': event_duration.strftime("%M:%S"),
'room': descriptions[name]['Title'],
'slug': voc.tools.normalise_string(f"{name}-{row['Tag']:0.0f}-{row['Am HT-Desk']}".lower()),
'start': start_time_hm,
'duration': event_duration.strftime("%H:%M"),
'room': name,
'slug': voc.tools.normalise_string(f"{name}-{int(row['Tag'])}-{start_time_hm}".lower()),
'url': descriptions[name]['Link'],
'title': descriptions[name]['Title'],
'subtitle': None,
'track': None,
'type': None,
'title': title,
'subtitle': subtitle,
'track': "Hackertours",
'type': "Tour",
'language': row['Sprache'],
'abstract': descriptions[name]['Abstract'],
'abstract': abstract,
'description': None,
'persons': [],
'links': [
{
'url': descriptions[name]['Link'],
'title': descriptions[name]['Title']
'title': title
}
]
}))