Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -125,25 +125,27 @@ def create_print_layout(data, date_str):
|
|
125 |
hall_font = get_font(font_size)
|
126 |
movie_font = get_font(font_size)
|
127 |
|
128 |
-
# Display date at the top left
|
129 |
-
ax.text(0.02, 0.99, date_str, color='#A9A9A9',
|
130 |
-
ha='left', va='top', fontproperties=date_font, transform=ax.transAxes)
|
131 |
-
|
132 |
-
# Set starting Y position after top margin
|
133 |
-
y_position = 0.98 - row_height
|
134 |
-
|
135 |
# Define X positions for columns
|
136 |
-
|
|
|
137 |
col_movie_right = 0.50
|
138 |
col_seq_left = 0.52
|
139 |
col_pinyin_left = 0.62
|
140 |
col_time_left = 0.75
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
for i, hall in enumerate(halls):
|
143 |
hall_data = data[data['Hall'] == hall]
|
144 |
|
145 |
-
#
|
146 |
if i > 0:
|
|
|
147 |
ax.axhline(y=y_position + row_height / 2, xmin=col_hall_left, xmax=0.97, color='black', linewidth=0.7)
|
148 |
y_position -= row_height # Move down one row for the separator space
|
149 |
|
@@ -155,7 +157,6 @@ def create_print_layout(data, date_str):
|
|
155 |
ha='left', va='center', fontweight='bold',
|
156 |
fontproperties=hall_font, transform=ax.transAxes)
|
157 |
|
158 |
-
# 3 & 4. New content order and alignment
|
159 |
# Column: Movie Name (Right-aligned)
|
160 |
ax.text(col_movie_right, y_position, row['Movie'],
|
161 |
ha='right', va='center', fontproperties=movie_font, transform=ax.transAxes)
|
|
|
125 |
hall_font = get_font(font_size)
|
126 |
movie_font = get_font(font_size)
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
# Define X positions for columns
|
129 |
+
# MODIFICATION: Hall number is now at the far left (x=0.0)
|
130 |
+
col_hall_left = 0.0
|
131 |
col_movie_right = 0.50
|
132 |
col_seq_left = 0.52
|
133 |
col_pinyin_left = 0.62
|
134 |
col_time_left = 0.75
|
135 |
+
|
136 |
+
# Display date at the top left, aligned with the hall number
|
137 |
+
ax.text(col_hall_left, 0.99, date_str, color='#A9A9A9',
|
138 |
+
ha='left', va='top', fontproperties=date_font, transform=ax.transAxes)
|
139 |
+
|
140 |
+
# Set starting Y position after top margin
|
141 |
+
y_position = 0.98 - row_height
|
142 |
|
143 |
for i, hall in enumerate(halls):
|
144 |
hall_data = data[data['Hall'] == hall]
|
145 |
|
146 |
+
# Add a separator line between halls (not before the first one)
|
147 |
if i > 0:
|
148 |
+
# MODIFICATION: Line starts at the far left, aligned with the hall number
|
149 |
ax.axhline(y=y_position + row_height / 2, xmin=col_hall_left, xmax=0.97, color='black', linewidth=0.7)
|
150 |
y_position -= row_height # Move down one row for the separator space
|
151 |
|
|
|
157 |
ha='left', va='center', fontweight='bold',
|
158 |
fontproperties=hall_font, transform=ax.transAxes)
|
159 |
|
|
|
160 |
# Column: Movie Name (Right-aligned)
|
161 |
ax.text(col_movie_right, y_position, row['Movie'],
|
162 |
ha='right', va='center', fontproperties=movie_font, transform=ax.transAxes)
|