mirror of
https://github.com/MathiasDPX/grainParisArt.git
synced 2025-01-09 08:26:40 +00:00
20 lines
No EOL
698 B
Python
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) |