extract-python 0.12.1__py3-none-any.whl → 0.12.3__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.
- extract_python/liteparse_.py +5 -1
- {extract_python-0.12.1.dist-info → extract_python-0.12.3.dist-info}/METADATA +2 -3
- {extract_python-0.12.1.dist-info → extract_python-0.12.3.dist-info}/RECORD +5 -5
- {extract_python-0.12.1.dist-info → extract_python-0.12.3.dist-info}/WHEEL +1 -1
- {extract_python-0.12.1.dist-info → extract_python-0.12.3.dist-info}/entry_points.txt +0 -0
extract_python/liteparse_.py
CHANGED
|
@@ -26,7 +26,6 @@ from extract_core import (
|
|
|
26
26
|
SupportedExt,
|
|
27
27
|
)
|
|
28
28
|
from pydantic import TypeAdapter
|
|
29
|
-
from tesserocr import tesserocr
|
|
30
29
|
|
|
31
30
|
from .constants import ARTIFACTS, DEFAULT_MD_PAGE_SEP
|
|
32
31
|
from .utils import (
|
|
@@ -44,6 +43,7 @@ from .utils import (
|
|
|
44
43
|
logger = logging.getLogger(__name__)
|
|
45
44
|
if TYPE_CHECKING:
|
|
46
45
|
import pypdfium2 as pdfium
|
|
46
|
+
import tesserocr
|
|
47
47
|
from liteparse import LiteParse
|
|
48
48
|
from liteparse.types import (
|
|
49
49
|
ExtractedImage,
|
|
@@ -554,6 +554,10 @@ class _PDFDocCache:
|
|
|
554
554
|
self._path = path
|
|
555
555
|
return self._doc
|
|
556
556
|
|
|
557
|
+
def __del__(self):
|
|
558
|
+
if self._doc is not None:
|
|
559
|
+
self._doc.close()
|
|
560
|
+
|
|
557
561
|
|
|
558
562
|
# we have to use a global cache because pdfnium is not thread safe and not
|
|
559
563
|
# pickleable
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: extract-python
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.3
|
|
4
4
|
Summary: Structured content extraction
|
|
5
5
|
Project-URL: Homepage, https://github.com/ICIJ/extract-python
|
|
6
6
|
Project-URL: Repository, https://github.com/ICIJ/extract-python
|
|
7
7
|
Project-URL: Issues, https://github.com/ICIJ/extract-python/issues
|
|
8
8
|
Author-email: Clément Doumouro <cdoumouro@icij.org>
|
|
9
9
|
Requires-Python: <3.15,>=3.13
|
|
10
|
-
Requires-Dist: extract-core~=0.12.
|
|
11
|
-
Requires-Dist: icij-common~=0.8.2
|
|
10
|
+
Requires-Dist: extract-core~=0.12.3
|
|
12
11
|
Requires-Dist: pympler~=1.1
|
|
13
12
|
Provides-Extra: benches
|
|
14
13
|
Requires-Dist: html2image~=2.0.7; extra == 'benches'
|
|
@@ -2,14 +2,14 @@ extract_python/__init__.py,sha256=f6d2exh99z6uR30zDqrnhg5NAx8MFFExvexqM6AaILM,95
|
|
|
2
2
|
extract_python/__main__.py,sha256=g-fvS46zl9umKmGrSpl-OG-8PSuZgjqvTCqjpsZtSps,101
|
|
3
3
|
extract_python/constants.py,sha256=659V40LcTWJhX3IbuJLSSvI5AsGJh9ciMrGCfzJn2zA,98
|
|
4
4
|
extract_python/docling_.py,sha256=2LaZHEHUcEhEEEHxzb6Ih-niOOpeS5G9k3nJzNB2jrY,10022
|
|
5
|
-
extract_python/liteparse_.py,sha256=
|
|
5
|
+
extract_python/liteparse_.py,sha256=E39_g-iEar6Z2fL1NNHmPTQisdN5KYDHvZ2xoewyTrU,20372
|
|
6
6
|
extract_python/marker_.py,sha256=bb0DJXrSWOznIuPnw4-adR5_R9QiwtFGGBh5KlXFxjM,3323
|
|
7
7
|
extract_python/mineru_.py,sha256=D1dE9Qq7txWOrtK9cN1PjXEd6eKo7pKH6xR7zOs2q5I,4101
|
|
8
8
|
extract_python/utils.py,sha256=jmxO8wHD99jO0f3fKQGhKxhCfQckf89_pEtPVlGnyJs,13435
|
|
9
9
|
extract_python/cli/__init__.py,sha256=Xt3MB74fO8cimm0Xas8dIMmXu62O0dV-4o3-OUzZggo,1245
|
|
10
10
|
extract_python/cli/doc.py,sha256=SMwRs-7-u_lw3wpHO6m3vFYnbjYCn_qIVC-q2TIxcbg,2435
|
|
11
11
|
extract_python/cli/utils.py,sha256=Png7oGKKxDeStn27k-o4Hxlzl-G-u-QDSH6IfJqUk1I,667
|
|
12
|
-
extract_python-0.12.
|
|
13
|
-
extract_python-0.12.
|
|
14
|
-
extract_python-0.12.
|
|
15
|
-
extract_python-0.12.
|
|
12
|
+
extract_python-0.12.3.dist-info/METADATA,sha256=T3rVACZOoXZWoJtlfMZIJlsbd4sEHnzixFS2Updgt48,1628
|
|
13
|
+
extract_python-0.12.3.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
14
|
+
extract_python-0.12.3.dist-info/entry_points.txt,sha256=noSkCWA0LRm0V7WbmYDPBnJrKeiYdpvXynAW6y72Z4M,64
|
|
15
|
+
extract_python-0.12.3.dist-info/RECORD,,
|
|
File without changes
|