mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
cleaned up the export
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
parent
2af57ec35a
commit
c308d7e87a
@ -344,9 +344,7 @@ class ConvertedDocument(BaseModel):
|
|||||||
"subtitle-level-1",
|
"subtitle-level-1",
|
||||||
"paragraph",
|
"paragraph",
|
||||||
"caption",
|
"caption",
|
||||||
"table",
|
]
|
||||||
],
|
|
||||||
strict_text: bool = False,
|
|
||||||
):
|
):
|
||||||
return self.output.export_to_markdown(
|
return self.output.export_to_markdown(
|
||||||
delim=delim,
|
delim=delim,
|
||||||
|
@ -38,8 +38,8 @@ def export_documents(
|
|||||||
with (output_dir / f"{doc_filename}.md").open("w") as fp:
|
with (output_dir / f"{doc_filename}.md").open("w") as fp:
|
||||||
fp.write(conv_res.render_as_markdown())
|
fp.write(conv_res.render_as_markdown())
|
||||||
|
|
||||||
# Export Document Tages format:
|
# Export Document Tags format:
|
||||||
with (output_dir / f"{doc_filename}.md").open("w") as fp:
|
with (output_dir / f"{doc_filename}.doctags").open("w") as fp:
|
||||||
fp.write(conv_res.render_as_doctags())
|
fp.write(conv_res.render_as_doctags())
|
||||||
|
|
||||||
elif conv_res.status == ConversionStatus.PARTIAL_SUCCESS:
|
elif conv_res.status == ConversionStatus.PARTIAL_SUCCESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user