From 5225a2f072acc9b2036baab9c1f66f16b2f26481 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 4 Aug 2025 15:38:03 +0200 Subject: [PATCH] #7678 --- resources/tools/docling/convert_page.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/resources/tools/docling/convert_page.py b/resources/tools/docling/convert_page.py index 8079c54..7adbb74 100644 --- a/resources/tools/docling/convert_page.py +++ b/resources/tools/docling/convert_page.py @@ -24,12 +24,10 @@ result = converter.convert(sys.argv[1]) allpages=result.document.export_to_markdown(page_break_placeholder="", image_mode=ImageRefMode.EMBEDDED); Path(sys.argv[2]+"document.md").write_text(allpages) i=0 -j=0 for md in allpages.split(""): i+=1 - j+=1 - while os.stats(Path(sys.argv[2] + "/../texts/fh{j}.html")).st_size < 21: - Path(sys.argv[2]+"p"+str(j)+".md").write_text("") - j+=1 - Path(sys.argv[2]+"p"+str(j)+".md").write_text(md) + while os.stat(Path(sys.argv[2] + "/../texts/fh{i}.html")).st_size < 21: + Path(sys.argv[2]+"p{i}.md").write_text("") + i+=1 + Path(sys.argv[2]+"p{i}.md").write_text(md) -- 2.39.5