Module specs._types._section
section spec typed dict
Classes
class SectionSpec (*args, **kwargs)
-
Section spec TypedDict definition.
Attributes
exact_titles
:list[str]
- list of exact section titles to match
force_names
:list[ForceNameTuple]
- list of tuples of check functions and names to force if the check function returns True when passed a current section's title.
strip_ends
:list[str]
- list of strings to strip from the end of a section title.
heading_breaks
:list[HBTuple]
- list of tuples of break strings to remove unwanted data from section titles.
sect_start_checks
:list[Callable]
- list of functions to check if a section has started when passed the list of remaining extracted lines of text.
end_sect_latches
:list[LTTuple]
- list of tuples containing a latch function that should return True when passed the list of remaining lines if the section is ending, a trigger function to end the section based on the current line, and an unlatch function to clear the "section ending" latch based on the current line.
sect_start_dqs
:list[su.SectStartDisqualifier]
- list of su.SectStartDisqualifier. Disqualify section starts based on the currently extracting section name and the remaining extracted text.
line_roll_checks
:list[su.LineRollCheck]
- list of LineRoleCheck tuples defining tests to detect and functions to correct improper line wrapping in the source document.
wrap_lines
:bool
- if True, search for horizontally distributed table layouts and move tables in the rightmost column such that they appear below the table in the leftmost column.
document_strippers
:list[StripperTuple]
- list of tuples defining document stripper classes and their kwargs.
Ancestors
- builtins.dict
Class variables
var document_strippers : list[utilities.section_utils.StripperTuple]
var end_sect_latches : list[utilities.section_utils.LTTuple]
var exact_titles : list[str]
var force_names : list[utilities.section_utils.ForceNameTuple]
var heading_breaks : list[utilities.section_utils.HBTuple]
var line_roll_checks : list[utilities.section_utils.LineRollCheck]
var sect_start_checks : list[collections.abc.Callable[[collections.abc.Sequence[str]], bool]]
var sect_start_dqs : list[utilities.section_utils.SectStartDisqualifier]
var strip_ends : list[str]
var wrap_lines : bool