fixed PPTC examples load
This commit is contained in:
@@ -146,7 +146,7 @@ def compare_pptx_files(file1_path, file2_path, **options):
|
||||
examine_font_underline = options.get("examine_font_underline", True)
|
||||
examine_strike_through = options.get("examine_strike_through", True)
|
||||
examine_alignment = options.get("examine_alignment", True)
|
||||
examine_title_bottom_position = options.get("examine_bottom_position", False)
|
||||
examine_title_bottom_position = options.get("examine_title_bottom_position", False)
|
||||
examine_table_bottom_position = options.get("examine_table_bottom_position", False)
|
||||
examine_right_position = options.get("examine_right_position", False)
|
||||
examine_top_position = options.get("examine_top_position", False)
|
||||
@@ -188,26 +188,26 @@ def compare_pptx_files(file1_path, file2_path, **options):
|
||||
for shape1, shape2 in zip(slide1.shapes, slide2.shapes):
|
||||
if examine_title_bottom_position:
|
||||
if hasattr(shape1, "text") and hasattr(shape2, "text") and shape1.text == shape2.text:
|
||||
if shape1.text == "Product Comparison" and shape1.top <= shape2.top:
|
||||
if shape1.text == "Product Comparison" and (shape1.top <= shape2.top or shape1.top < 3600000):
|
||||
return 0
|
||||
elif shape1.left != shape2.left or shape1.top != shape2.top or shape1.width != shape2.width or shape1.height != shape2.height:
|
||||
return 0
|
||||
|
||||
if examine_table_bottom_position:
|
||||
if slide_idx == 3 and shape1.shape_type == 19 and shape2.shape_type == 19:
|
||||
if shape1.top <= shape2.top:
|
||||
if shape1.top <= shape2.top or shape1.top < 3600000:
|
||||
return 0
|
||||
elif shape1.left != shape2.left or shape1.top != shape2.top or shape1.width != shape2.width or shape1.height != shape2.height:
|
||||
return 0
|
||||
|
||||
if examine_right_position:
|
||||
if slide_idx == 2 and not hasattr(shape1, "text") and not hasattr(shape2, "text"):
|
||||
if shape1.left <= shape2.left:
|
||||
if shape1.left <= shape2.left or shape1.left < 4320000:
|
||||
return 0
|
||||
|
||||
if examine_top_position:
|
||||
if shape1.top != shape2.top and not hasattr(shape1, "text") and not hasattr(shape2, "text"):
|
||||
if shape1.top >= shape2.top:
|
||||
if slide_idx == 2 and shape1.shape_type == 13 and shape2.shape_type == 13:
|
||||
if shape1.top >= shape2.top or shape1.top > 1980000:
|
||||
return 0
|
||||
elif shape1.left != shape2.left or shape1.top != shape2.top or shape1.width != shape2.width or shape1.height != shape2.height:
|
||||
return 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=1UtLhtBliwRqYauvNGXcEKFDw1BaSaD90&export=download&authuser=0&confirm=t&uuid=dec528e0-4278-401b-88b2-980e23d72253&at=APZUnTUKrfSQYtajt1NU46ljMXAJ:1708404863068",
|
||||
"url": "https://drive.usercontent.google.com/download?id=1UtLhtBliwRqYauvNGXcEKFDw1BaSaD90&export=download&authuser=0&confirm=t&uuid=738d33e2-0fac-42c4-9e3b-d5806cc7106f&at=APZUnTX5D_liJdRoPqrXNB9Qrrcu:1708586209947",
|
||||
"path": "/home/user/Desktop/45_1.pptx"
|
||||
}
|
||||
]
|
||||
@@ -61,7 +61,7 @@
|
||||
"func": "compare_pptx_files",
|
||||
"expected": {
|
||||
"type": "cloud_file",
|
||||
"path": "https://drive.usercontent.google.com/download?id=10T5lxEsBUZ9onRZtXSPEyZWlWoXHICdE&export=download&authuser=0&confirm=t&uuid=d62506a0-c906-4902-ae88-82b97d37e6f4&at=APZUnTWG8DSSA_xSm0C4PKCbGWUT:1708405198113",
|
||||
"path": "https://drive.usercontent.google.com/download?id=10T5lxEsBUZ9onRZtXSPEyZWlWoXHICdE&export=download&authuser=0&confirm=t&uuid=beb793fd-866c-4b81-8b39-5f8bf7980b6b&at=APZUnTV1fn3nnttcIJe1Emd4WyBU:1708586437242",
|
||||
"dest": "45_1_Gold.pptx"
|
||||
},
|
||||
"result": {
|
||||
|
||||
Reference in New Issue
Block a user