Skip to content
Snippets Groups Projects
Commit c47ef383 authored by Jan Hartig's avatar Jan Hartig
Browse files

Make transcript more readable

parent 48bf7cc4
No related branches found
No related tags found
No related merge requests found
Pipeline #55431 failed
...@@ -118,15 +118,13 @@ def main(end): ...@@ -118,15 +118,13 @@ def main(end):
lines.append(match.groups()) lines.append(match.groups())
transcript = "" transcript = ""
first_line = True
previous_speaker = None previous_speaker = None
for speaker, line in lines: for speaker, line in lines:
if previous_speaker == speaker: if previous_speaker == speaker:
transcript += f" {line}" transcript += f" {line}"
else: else:
previous_speaker = speaker previous_speaker = speaker
transcript += f"{'\n' if not first_line else ''}{speaker}: {line}" transcript += f"\n\n{speaker}: {line}"
first_line = False
msg.add_attachment(transcript, filename=filename) msg.add_attachment(transcript, filename=filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment