Add Substitle and differentiate by language
This commit is contained in:
parent
89677fbeee
commit
d734e94a7a
1 changed files with 20 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue