Skip to content

Commit

Permalink
voctoweb fix description assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Oct 19, 2024
1 parent fa4e6a7 commit 1d5b3bc
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions voctopublish/api_client/voctoweb_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,23 +408,20 @@ def create_or_update_event(self):
else:
event_url = "https://c3voc.de"

description = []
if self.t.abstract is not None:
description.append(self.t.abstract)

if self.t.description is not None:
if self.t.abstract is not None:
description = "\n\n".join([self.t.abstract, self.t.description])
else:
description = self.t.description
else:
description = self.t.abstract
description.append(self.t.description)

if self.t.links:
for link in self.t.links:
description = "\n\n".join(
[description, '<a href="' + link + '">' + link + "</a>"]
)
description.append('<a href="' + link + '">' + link + "</a>")

if self.t.license:
# FIXME <https://github.com/emfcamp/Website/issues/1780>
description += f"\n\n{self.t.license}"
description.append(self.t.license)

# API code https://github.com/voc/voctoweb/blob/master/app/controllers/api/events_controller.rb
headers = {
Expand All @@ -445,7 +442,7 @@ def create_or_update_event(self):
"timeline_filename": self.t.voctoweb_filename_base + ".timeline.jpg",
"thumbnails_filename": self.t.voctoweb_filename_base
+ ".thumbnails.vtt",
"description": description,
"description": "\n\n".join(description),
"date": self.t.date,
"persons": self.t.people,
"tags": self.t.voctoweb_tags,
Expand Down

0 comments on commit 1d5b3bc

Please sign in to comment.