update impress eval examples
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user