Add impress examples; remove the auto-saving pyautogui commands change to libreoffice pre-setting

This commit is contained in:
Timothyxxx
2024-01-29 21:34:58 +08:00
parent 17514907d9
commit 343813a29b
29 changed files with 163 additions and 44 deletions

View File

@@ -253,15 +253,15 @@ def evaluate_colored_words_in_tables(file_path1, file_path2):
def check_highlighted_words(file_path1, file_path2):
if not compare_docx_files(file_path1, file_path2):
return 0
# if not compare_docx_files(file_path1, file_path2):
# return 0
# Extract content.xml from the .odt file
extract_dir = file_path1 + "_extracted"
with zipfile.ZipFile(file_path1, 'r') as zip_ref:
zip_ref.extractall(extract_dir)
content_xml_path = os.path.join(extract_dir, 'content.xml')
with open(content_xml_path, 'r') as file:
with open(content_xml_path, 'r', encoding="utf-8") as file:
content_xml = file.read()
# Check for yellow highlights in the content.xml