]> _ Git - cubist_pdf.git/commitdiff
#7678
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 4 Aug 2025 13:43:12 +0000 (15:43 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 4 Aug 2025 13:43:12 +0000 (15:43 +0200)
resources/tools/docling/convert_page.py

index 7adbb749dc6feaf6cbafea33dc0a8301fa9bef5e..d91230a578bdd592af0f5df63174cd138ab4dc5d 100644 (file)
@@ -26,8 +26,8 @@ Path(sys.argv[2]+"document.md").write_text(allpages)
 i=0
 for md in allpages.split("<!-- page break -->"):
     i+=1
-    while os.stat(Path(sys.argv[2] + "/../texts/fh{i}.html")).st_size < 21:
-        Path(sys.argv[2]+"p{i}.md").write_text("")
+    while os.stat(Path(sys.argv[2] + "/../texts/fh"+str(i)+".html")).st_size < 21:
+        Path(sys.argv[2]+"p"+str(i)+".md").write_text("")
         i+=1
-    Path(sys.argv[2]+"p{i}.md").write_text(md)
+    Path(sys.argv[2]+"p"+str(i)+".md").write_text(md)