Skip to content

Commit 813bfdf

Browse files
committed
Update header information for the table in the end based on the comments from biology group.
1 parent 9278f15 commit 813bfdf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Script/PRONTO.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ def insert_table_to_ppt_end(table_data_file,slide_n,table_name,left_h,top_h,widt
818818

819819
total_rows = len (data_rows)
820820
start_idx = 0
821+
table_page_num = 1
821822
while start_idx < total_rows:
822823
end_idx = min(start_idx + table_max_rows_per_slide, total_rows)
823824
slide_data = data_rows[start_idx:end_idx]
@@ -845,12 +846,13 @@ def insert_table_to_ppt_end(table_data_file,slide_n,table_name,left_h,top_h,widt
845846
textbox = slide.shapes.add_textbox(Inches(left_h),Inches(top_h),Inches(width_h),Inches(0.25))
846847
tf = textbox.text_frame
847848
if(if_print_rowNo == True):
848-
tf.paragraphs[0].text = table_name +" (N=" + str(table_rows - 1) + ")"
849+
tf.paragraphs[0].text = table_name +" (N=" + str(total_rows) + ", Page " + str(table_page_num) + "/" + str(total_slides_needed) + ")"
849850
else:
850851
tf.paragraphs[0].text = table_name
851852
tf.paragraphs[0].font.size = Pt(8)
852853
tf.paragraphs[0].font.bold = True
853854
tf.paragraphs[0].alignment = PP_ALIGN.CENTER
855+
table_page_num = table_page_num + 1
854856

855857
ppt.save(output_ppt_file)
856858
return total_slides_needed

0 commit comments

Comments
 (0)