update impress eval examples

This commit is contained in:
tsuky_chen
2024-01-17 18:00:20 +08:00
parent 196d9d27b9
commit ba8ae104cf
5 changed files with 126 additions and 15 deletions

View File

@@ -94,6 +94,25 @@ def check_formula_shape(prs):
return 1
return 0
def check_slide_orientation_Portrait(pptx_path):
presentation = Presentation(pptx_path)
slide_height = presentation.slide_height
slide_width = presentation.slide_width
if slide_width < slide_height:
return 1
return 0
def contains_mp4_video(pptx_path):
prs = Presentation(pptx_path)
for slide in prs.slides:
for shape in slide.shapes:
if shape.shape_type == 16:
if shape.media_type == 3:
return 1
return 0
if __name__ == "__main__":
path1 = "../../任务数据/LibreOffice Impress/Change_Color_Slide_Number_gold_textbox.pptx"
presentation = Presentation(path1)