fix some multi_apps task (#243)
* fix chrome * fix: fix proxy setup * feat&fix: add proxy support in setup and remove hardcoded proxy from example * fix tasks * fix chrome finished * fix * clean chrome_fix code * clean chrome_fix code * fix chrome 2888b4e6-5b47-4b57-8bf5-c73827890774 * fix multiapps * fix chrome 2888b4e6-5b47-4b57-8bf5-c73827890774 * fix some multi_apps tasks * fix some multi_apps tasks --------- Co-authored-by: adlsdztony <zzl0712@connect.hku.hk>
This commit is contained in:
@@ -87,6 +87,7 @@ def compare_docx_files(file1, file2, **options):
|
||||
ignore_order = options.get('ignore_order', False)
|
||||
content_only = options.get('content_only', False)
|
||||
fuzzy_match = options.get('fuzzy_match', False)
|
||||
delete_empty_lines = options.get('delete_empty_lines', False)
|
||||
|
||||
if not file1 or not file2:
|
||||
return 0
|
||||
@@ -120,6 +121,9 @@ def compare_docx_files(file1, file2, **options):
|
||||
if ignore_order:
|
||||
doc1_paragraphs = sorted(doc1_paragraphs)
|
||||
doc2_paragraphs = sorted(doc2_paragraphs)
|
||||
if delete_empty_lines:
|
||||
doc1_paragraphs = [p for p in doc1_paragraphs if p.strip()]
|
||||
doc2_paragraphs = [p for p in doc2_paragraphs if p.strip()]
|
||||
elif file1.endswith('.odt') and file2.endswith('.odt'):
|
||||
try:
|
||||
doc1 = load(file1)
|
||||
@@ -132,6 +136,9 @@ def compare_docx_files(file1, file2, **options):
|
||||
if ignore_order:
|
||||
doc1_paragraphs = sorted(doc1_paragraphs)
|
||||
doc2_paragraphs = sorted(doc2_paragraphs)
|
||||
if delete_empty_lines:
|
||||
doc1_paragraphs = [p for p in doc1_paragraphs if p.strip()]
|
||||
doc2_paragraphs = [p for p in doc2_paragraphs if p.strip()]
|
||||
else:
|
||||
# Unsupported file types or mismatch
|
||||
print("Unsupported file types or mismatch between file types.")
|
||||
|
||||
Reference in New Issue
Block a user