docling-core 2.5.0__py3-none-any.whl → 2.5.1__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.
Potentially problematic release.
This version of docling-core might be problematic. Click here for more details.
- docling_core/types/doc/document.py +13 -3
- {docling_core-2.5.0.dist-info → docling_core-2.5.1.dist-info}/METADATA +1 -1
- {docling_core-2.5.0.dist-info → docling_core-2.5.1.dist-info}/RECORD +6 -6
- {docling_core-2.5.0.dist-info → docling_core-2.5.1.dist-info}/LICENSE +0 -0
- {docling_core-2.5.0.dist-info → docling_core-2.5.1.dist-info}/WHEEL +0 -0
- {docling_core-2.5.0.dist-info → docling_core-2.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -10,6 +10,7 @@ import re
|
|
|
10
10
|
import sys
|
|
11
11
|
import textwrap
|
|
12
12
|
import typing
|
|
13
|
+
import warnings
|
|
13
14
|
from io import BytesIO
|
|
14
15
|
from pathlib import Path
|
|
15
16
|
from typing import Any, Dict, Final, List, Literal, Optional, Tuple, Union
|
|
@@ -1008,14 +1009,23 @@ class TableItem(FloatingItem):
|
|
|
1008
1009
|
)
|
|
1009
1010
|
return md_table
|
|
1010
1011
|
|
|
1011
|
-
def export_to_html(
|
|
1012
|
+
def export_to_html(
|
|
1013
|
+
self, doc: Optional["DoclingDocument"] = None, add_caption: bool = True
|
|
1014
|
+
) -> str:
|
|
1012
1015
|
"""Export the table as html."""
|
|
1016
|
+
if doc is None:
|
|
1017
|
+
warnings.warn(
|
|
1018
|
+
"The `doc` argument will be mandatory in a future version. "
|
|
1019
|
+
"It must be provided to include a caption.",
|
|
1020
|
+
DeprecationWarning,
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1013
1023
|
body = ""
|
|
1014
1024
|
nrows = self.data.num_rows
|
|
1015
1025
|
ncols = self.data.num_cols
|
|
1016
1026
|
|
|
1017
1027
|
text = ""
|
|
1018
|
-
if add_caption and len(self.captions):
|
|
1028
|
+
if doc is not None and add_caption and len(self.captions):
|
|
1019
1029
|
text = self.caption_text(doc)
|
|
1020
1030
|
|
|
1021
1031
|
if len(self.data.table_cells) == 0:
|
|
@@ -2037,7 +2047,7 @@ class DoclingDocument(BaseModel):
|
|
|
2037
2047
|
if artifacts_dir is None:
|
|
2038
2048
|
# Remove the extension and add '_pictures'
|
|
2039
2049
|
artifacts_dir = filename.with_suffix("")
|
|
2040
|
-
artifacts_dir = artifacts_dir.with_name(artifacts_dir.
|
|
2050
|
+
artifacts_dir = artifacts_dir.with_name(artifacts_dir.name + "_artifacts")
|
|
2041
2051
|
if artifacts_dir.is_absolute():
|
|
2042
2052
|
reference_path = None
|
|
2043
2053
|
else:
|
|
@@ -21,7 +21,7 @@ docling_core/types/__init__.py,sha256=MVRSgsk5focwGyAplh_TRR3dEecIXpd98g_u3zZ5HX
|
|
|
21
21
|
docling_core/types/base.py,sha256=PusJskRVL19y-hq0BgXr5e8--QEqSqLnFNJ8UbOqW88,8318
|
|
22
22
|
docling_core/types/doc/__init__.py,sha256=bEL4zKVOG7Wxm6xQrgF58mu-Teds9aSavuEAKVNhrTU,639
|
|
23
23
|
docling_core/types/doc/base.py,sha256=_ttU8QI8wXDTQRUnN5n7L6D9wYFVLSAibxlFoMbgAsk,4557
|
|
24
|
-
docling_core/types/doc/document.py,sha256=
|
|
24
|
+
docling_core/types/doc/document.py,sha256=apWwh2ixsVc0axtqJec3xKNuYmEwFDB00fQ2vJdKgBA,86018
|
|
25
25
|
docling_core/types/doc/labels.py,sha256=A8vWP82VAeXO1rlCO0oDKo_Hb8uDeQe0myOTY3P03hk,1596
|
|
26
26
|
docling_core/types/gen/__init__.py,sha256=C6TuCfvpSnSL5XDOFMcYHUY2-i08vvfOGRcdu6Af0pI,124
|
|
27
27
|
docling_core/types/gen/generic.py,sha256=l4CZ4_Lb8ONG36WNJWbKX5hGKvTh_yU-hXp5hsm7uVU,844
|
|
@@ -49,8 +49,8 @@ docling_core/utils/generate_docs.py,sha256=BdKAoduWXOc7YMvcmlhjoJOFlUxij1ybxglj6
|
|
|
49
49
|
docling_core/utils/generate_jsonschema.py,sha256=uNX1O5XnjyB5nA66XqZXTt3YbGuR2tyi_OhHepHYtZg,1654
|
|
50
50
|
docling_core/utils/validate.py,sha256=3FmnxnKTDZC5J9OGxCL3U3DGRl0t0bBV1NcySXswdas,2031
|
|
51
51
|
docling_core/utils/validators.py,sha256=azcrndLzhNkTWnbFSu9shJ5D3j_znnLrIFA5R8hzmGU,2798
|
|
52
|
-
docling_core-2.5.
|
|
53
|
-
docling_core-2.5.
|
|
54
|
-
docling_core-2.5.
|
|
55
|
-
docling_core-2.5.
|
|
56
|
-
docling_core-2.5.
|
|
52
|
+
docling_core-2.5.1.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
|
|
53
|
+
docling_core-2.5.1.dist-info/METADATA,sha256=9K3Hip_Uev5copWGL0ragXG-N5uFHQiF2SNk0se2m_o,5468
|
|
54
|
+
docling_core-2.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
55
|
+
docling_core-2.5.1.dist-info/entry_points.txt,sha256=jIxlWv3tnO04irlZc0zfhqJIgz1bg9Hha4AkaLWSdUA,177
|
|
56
|
+
docling_core-2.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|