mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-07-25 09:57:15 +00:00

Reviewers: I recommend reviewing commit-by-commit or just looking at the final version of `partition/docx.py` as View File. This refactor solves a few problems but mostly lays the groundwork to allow us to refine further aspects such as page-break detection, list-item detection, and moving python-docx internals upstream to that library so our work doesn't depend on that domain-knowledge.
34 lines
902 B
Python
34 lines
902 B
Python
from typing import Sequence
|
|
|
|
from docx.blkcntnr import BlockItemContainer
|
|
from docx.enum.section import WD_SECTION
|
|
from docx.oxml.section import CT_SectPr
|
|
|
|
class Section:
|
|
_sectPr: CT_SectPr
|
|
@property
|
|
def different_first_page_header_footer(self) -> bool: ...
|
|
@property
|
|
def even_page_footer(self) -> _Footer: ...
|
|
@property
|
|
def even_page_header(self) -> _Header: ...
|
|
@property
|
|
def first_page_footer(self) -> _Footer: ...
|
|
@property
|
|
def first_page_header(self) -> _Header: ...
|
|
@property
|
|
def footer(self) -> _Footer: ...
|
|
@property
|
|
def header(self) -> _Header: ...
|
|
@property
|
|
def start_type(self) -> WD_SECTION: ...
|
|
|
|
class Sections(Sequence[Section]): ...
|
|
|
|
class _BaseHeaderFooter(BlockItemContainer):
|
|
@property
|
|
def is_linked_to_previous(self) -> bool: ...
|
|
|
|
class _Footer(_BaseHeaderFooter): ...
|
|
class _Header(_BaseHeaderFooter): ...
|