grainParisArt/modules/curl.py

20 lines
698 B
Python
Raw Normal View History

2024-12-30 18:07:15 +00:00
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)