grainParisArt/modules/curl.py
2024-12-30 19:07:15 +01:00

20 lines
No EOL
698 B
Python

border_top = "" + "" * 58 + ""
border_bottom = "" + "" * 58 + ""
separator = "" + "" * 58 + ""
def handle_curl(movies):
table = [border_top, "{:^58}".format("CinéBrest"), separator]
for film in movies:
title_line = f"{film['title']:<57}"
table.append(title_line)
for cinema, seances in film['seances'].items():
cinema_line = f"║ ├─ {cinema:<54}"
seances_line = f"║ │ └─ : {', '.join(seances):<43}"
table.extend([cinema_line, seances_line])
table.append(separator)
table[-1] = border_bottom
return "\n".join(table)