mistocr 0.2.7__py3-none-any.whl → 0.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mistocr/__init__.py +1 -1
- mistocr/refine.py +7 -0
- {mistocr-0.2.7.dist-info → mistocr-0.2.8.dist-info}/METADATA +1 -1
- mistocr-0.2.8.dist-info/RECORD +11 -0
- mistocr-0.2.7.dist-info/RECORD +0 -11
- {mistocr-0.2.7.dist-info → mistocr-0.2.8.dist-info}/WHEEL +0 -0
- {mistocr-0.2.7.dist-info → mistocr-0.2.8.dist-info}/entry_points.txt +0 -0
- {mistocr-0.2.7.dist-info → mistocr-0.2.8.dist-info}/licenses/LICENSE +0 -0
- {mistocr-0.2.7.dist-info → mistocr-0.2.8.dist-info}/top_level.txt +0 -0
mistocr/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.8"
|
mistocr/refine.py
CHANGED
|
@@ -220,6 +220,12 @@ async def add_img_descs(
|
|
|
220
220
|
src_path,dst_path = Path(src),Path(dst) if dst else Path(src)
|
|
221
221
|
if dst_path != src_path: dst_path.mkdir(parents=True, exist_ok=True)
|
|
222
222
|
src_imgs = src_path/img_folder
|
|
223
|
+
|
|
224
|
+
# Check if image folder exists
|
|
225
|
+
if not src_imgs.exists():
|
|
226
|
+
if progress: print(f"No images to describe in the document (no '{img_folder}' folder found)")
|
|
227
|
+
return
|
|
228
|
+
|
|
223
229
|
if src_imgs.exists() and dst_path != src_path: shutil.copytree(src_imgs, dst_path/img_folder, dirs_exist_ok=True)
|
|
224
230
|
desc_file = src_path/'img_descriptions.json'
|
|
225
231
|
if desc_file.exists() and not force:
|
|
@@ -236,3 +242,4 @@ async def add_img_descs(
|
|
|
236
242
|
enriched = [add_descs_to_pg(pg, descs) for pg in pgs]
|
|
237
243
|
for i,pg in enumerate(enriched, 1): (dst_path/f'page_{i}.md').write_text(pg)
|
|
238
244
|
if progress: print(f"Done! Enriched pages saved to {dst_path}")
|
|
245
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
mistocr/__init__.py,sha256=G6Dbxq2ws-1ZAXwDD8q0KWueYtso_Y6Uyvtj8sRWsPI,22
|
|
2
|
+
mistocr/_modidx.py,sha256=55k_EmMPrRmLa04qCE-_8lukJPCax66q5MALfpa8T4A,4154
|
|
3
|
+
mistocr/core.py,sha256=KH5ND6ZMmETj9m9A-Ivtw5N2L-qm9vGwYgvHAzg-BsA,7218
|
|
4
|
+
mistocr/pipeline.py,sha256=k5rtr9ccxTgwQAzw533iMIL9qwiCofugWv0fhotLzaI,1639
|
|
5
|
+
mistocr/refine.py,sha256=yLnpqCEHRYfo1QQoAsgqk4INUjz_lYU8-tfEDgTC738,10544
|
|
6
|
+
mistocr-0.2.8.dist-info/licenses/LICENSE,sha256=xV8xoN4VOL0uw9X8RSs2IMuD_Ss_a9yAbtGNeBWZwnw,11337
|
|
7
|
+
mistocr-0.2.8.dist-info/METADATA,sha256=qATVQfErJIL_AbUSis3DhuM59fECxCWvgEoM15cRXf8,8416
|
|
8
|
+
mistocr-0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
mistocr-0.2.8.dist-info/entry_points.txt,sha256=HjAiHozobM-alm_6bTF-ehRr2DD3KYE9PgRngelONOY,36
|
|
10
|
+
mistocr-0.2.8.dist-info/top_level.txt,sha256=LelTYnSpSXLy1Hb1m2YP3gt8luwP-I8KV0NjP_ucdSs,8
|
|
11
|
+
mistocr-0.2.8.dist-info/RECORD,,
|
mistocr-0.2.7.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
mistocr/__init__.py,sha256=XHypfHSPdgXFKmOdoewn7czU670gt8InhHhzlP5j_aA,22
|
|
2
|
-
mistocr/_modidx.py,sha256=55k_EmMPrRmLa04qCE-_8lukJPCax66q5MALfpa8T4A,4154
|
|
3
|
-
mistocr/core.py,sha256=KH5ND6ZMmETj9m9A-Ivtw5N2L-qm9vGwYgvHAzg-BsA,7218
|
|
4
|
-
mistocr/pipeline.py,sha256=k5rtr9ccxTgwQAzw533iMIL9qwiCofugWv0fhotLzaI,1639
|
|
5
|
-
mistocr/refine.py,sha256=zSCF0gOtEKhhQTQgVq4Jh5Ujk8l8CGSO_rURhsQ09P8,10351
|
|
6
|
-
mistocr-0.2.7.dist-info/licenses/LICENSE,sha256=xV8xoN4VOL0uw9X8RSs2IMuD_Ss_a9yAbtGNeBWZwnw,11337
|
|
7
|
-
mistocr-0.2.7.dist-info/METADATA,sha256=eyQ65s8HsoHUUINrGiijrC8e0RzO_Wvte3rk2OLU8QY,8416
|
|
8
|
-
mistocr-0.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
mistocr-0.2.7.dist-info/entry_points.txt,sha256=HjAiHozobM-alm_6bTF-ehRr2DD3KYE9PgRngelONOY,36
|
|
10
|
-
mistocr-0.2.7.dist-info/top_level.txt,sha256=LelTYnSpSXLy1Hb1m2YP3gt8luwP-I8KV0NjP_ucdSs,8
|
|
11
|
-
mistocr-0.2.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|