Initial commit (Clean history)

This commit is contained in:
anhduy-tech
2025-12-30 11:27:14 +07:00
commit ef48c93de0
19255 changed files with 3248867 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
from . import documents
def extract_raw_text_from_element(element):
if isinstance(element, documents.Text):
return element.value
elif isinstance(element, documents.Tab):
return "\t"
else:
text = "".join(map(extract_raw_text_from_element, getattr(element, "children", [])))
if isinstance(element, documents.Paragraph):
return text + "\n\n"
else:
return text