docling-core 2.19.0__py3-none-any.whl → 2.19.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.

@@ -2126,6 +2126,7 @@ class DoclingDocument(BaseModel):
2126
2126
  indent: int = 4,
2127
2127
  text_width: int = -1,
2128
2128
  page_no: Optional[int] = None,
2129
+ included_content_layers: set[ContentLayer] = DEFAULT_CONTENT_LAYERS,
2129
2130
  ):
2130
2131
  """Save to markdown."""
2131
2132
  artifacts_dir, reference_path = self._get_output_paths(filename, artifacts_dir)
@@ -2149,6 +2150,7 @@ class DoclingDocument(BaseModel):
2149
2150
  indent=indent,
2150
2151
  text_width=text_width,
2151
2152
  page_no=page_no,
2153
+ included_content_layers=included_content_layers,
2152
2154
  )
2153
2155
 
2154
2156
  with open(filename, "w", encoding="utf-8") as fw:
@@ -2167,6 +2169,7 @@ class DoclingDocument(BaseModel):
2167
2169
  indent: int = 4,
2168
2170
  text_width: int = -1,
2169
2171
  page_no: Optional[int] = None,
2172
+ included_content_layers: set[ContentLayer] = DEFAULT_CONTENT_LAYERS,
2170
2173
  ) -> str:
2171
2174
  r"""Serialize to Markdown.
2172
2175
 
@@ -2248,7 +2251,12 @@ class DoclingDocument(BaseModel):
2248
2251
  mdtexts.append(text)
2249
2252
 
2250
2253
  for ix, (item, level) in enumerate(
2251
- self.iterate_items(self.body, with_groups=True, page_no=page_no)
2254
+ self.iterate_items(
2255
+ self.body,
2256
+ with_groups=True,
2257
+ page_no=page_no,
2258
+ included_content_layers=included_content_layers,
2259
+ )
2252
2260
  ):
2253
2261
  # If we've moved to a lower level, we're exiting one or more groups
2254
2262
  if level < previous_level:
@@ -2417,6 +2425,7 @@ class DoclingDocument(BaseModel):
2417
2425
  page_no: Optional[int] = None,
2418
2426
  html_lang: str = "en",
2419
2427
  html_head: str = _HTML_DEFAULT_HEAD,
2428
+ included_content_layers: set[ContentLayer] = DEFAULT_CONTENT_LAYERS,
2420
2429
  ):
2421
2430
  """Save to HTML."""
2422
2431
  artifacts_dir, reference_path = self._get_output_paths(filename, artifacts_dir)
@@ -2437,6 +2446,7 @@ class DoclingDocument(BaseModel):
2437
2446
  page_no=page_no,
2438
2447
  html_lang=html_lang,
2439
2448
  html_head=html_head,
2449
+ included_content_layers=included_content_layers,
2440
2450
  )
2441
2451
 
2442
2452
  with open(filename, "w", encoding="utf-8") as fw:
@@ -2484,6 +2494,7 @@ class DoclingDocument(BaseModel):
2484
2494
  page_no: Optional[int] = None,
2485
2495
  html_lang: str = "en",
2486
2496
  html_head: str = _HTML_DEFAULT_HEAD,
2497
+ included_content_layers: set[ContentLayer] = DEFAULT_CONTENT_LAYERS,
2487
2498
  ) -> str:
2488
2499
  r"""Serialize to HTML."""
2489
2500
 
@@ -2525,7 +2536,12 @@ class DoclingDocument(BaseModel):
2525
2536
  return text
2526
2537
 
2527
2538
  for ix, (item, curr_level) in enumerate(
2528
- self.iterate_items(self.body, with_groups=True, page_no=page_no)
2539
+ self.iterate_items(
2540
+ self.body,
2541
+ with_groups=True,
2542
+ page_no=page_no,
2543
+ included_content_layers=included_content_layers,
2544
+ )
2529
2545
  ):
2530
2546
  # If we've moved to a lower level, we're exiting one or more groups
2531
2547
  if curr_level < prev_level and len(in_ordered_list) > 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-core
3
- Version: 2.19.0
3
+ Version: 2.19.1
4
4
  Summary: A python library to define and validate data types in Docling.
5
5
  Home-page: https://ds4sd.github.io/
6
6
  License: MIT
@@ -24,7 +24,7 @@ docling_core/types/__init__.py,sha256=MVRSgsk5focwGyAplh_TRR3dEecIXpd98g_u3zZ5HX
24
24
  docling_core/types/base.py,sha256=PusJskRVL19y-hq0BgXr5e8--QEqSqLnFNJ8UbOqW88,8318
25
25
  docling_core/types/doc/__init__.py,sha256=bysJn2iwjAHwThSWDPXEdVUUij7p_ax12_nx2_0CMdg,653
26
26
  docling_core/types/doc/base.py,sha256=lMRNq1DUK7K26L2VNZRqFaItCSZ6m9BdYTVaJA98PZQ,11495
27
- docling_core/types/doc/document.py,sha256=GGwtTZspuv2Nd9d9kX1qkcHjb0Soxp2WE1l_RkZ2pNw,103687
27
+ docling_core/types/doc/document.py,sha256=t1nk1GeR5_YvZhuWUVZkkBekp89vFB4RBtMuwD3Acw4,104373
28
28
  docling_core/types/doc/labels.py,sha256=cqH4DGN9lgZns6gOtL5urzZzUPGOjHJ75xQbIKSh_h8,5306
29
29
  docling_core/types/doc/tokens.py,sha256=i73PXkmqXCLsQ5SddnJX8L9e_Ub2_K_DYSE-VE8NDq0,3925
30
30
  docling_core/types/doc/utils.py,sha256=SaiQD-WMMooFm1bMqwatU-IGhtG048iKJb-ppnJit_k,2250
@@ -56,8 +56,8 @@ docling_core/utils/generate_jsonschema.py,sha256=uNX1O5XnjyB5nA66XqZXTt3YbGuR2ty
56
56
  docling_core/utils/legacy.py,sha256=SqNQAxl97aHfoJEsC9vZcMJg5FNkmqKPFi-wdSrnfI0,24442
57
57
  docling_core/utils/validate.py,sha256=aQ11UbFyl8iD_N7yTTZmm_VVeXz8KcCyn3GLXgkfYRM,2049
58
58
  docling_core/utils/validators.py,sha256=azcrndLzhNkTWnbFSu9shJ5D3j_znnLrIFA5R8hzmGU,2798
59
- docling_core-2.19.0.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
60
- docling_core-2.19.0.dist-info/METADATA,sha256=inIV9-4qlmmQUldiQyEfm2kUUDCz6vZgKXXpVOzy73s,5803
61
- docling_core-2.19.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
62
- docling_core-2.19.0.dist-info/entry_points.txt,sha256=oClcdb2L2RKx4jdqUykY16Kum_f0_whwWhGzIodyidc,216
63
- docling_core-2.19.0.dist-info/RECORD,,
59
+ docling_core-2.19.1.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
60
+ docling_core-2.19.1.dist-info/METADATA,sha256=Uz-AUOD2_itxSEVxatsPbCQ0pFBE3fMX-gXx0YLmsKw,5803
61
+ docling_core-2.19.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
62
+ docling_core-2.19.1.dist-info/entry_points.txt,sha256=oClcdb2L2RKx4jdqUykY16Kum_f0_whwWhGzIodyidc,216
63
+ docling_core-2.19.1.dist-info/RECORD,,