Skip to content

Commit 7f51aac

Browse files
authored
Add debug logging (#187)
1 parent 672cd49 commit 7f51aac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ebdamame/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def _get_tables_and_paragaphs(document: Document) -> Generator[Union[Table, Para
4848
yield Paragraph(item, document)
4949
elif isinstance(item, CT_Tbl):
5050
yield Table(item, document)
51+
else:
52+
_logger.debug("Item %s is neither Paragraph nor Table", str(item))
5153

5254

5355
_ebd_key_pattern = re.compile(r"^E_\d{4}$")
@@ -138,7 +140,7 @@ def get_ebd_docx_tables(docx_file_path: Path, ebd_key: str) -> List[Table]:
138140
):
139141
table: Table = table_or_paragraph
140142
tables.append(table)
141-
# Now we have to check if the EBD table spans multiple pages and _maybe_ we have to collect more tables.
143+
# Now we have to check if the EBD table spans multiple pages, and _maybe_ we have to collect more tables.
142144
# The funny thing is: Sometimes the authors create multiple tables split over multiple lines which belong
143145
# together, sometimes they create 1 proper table that spans multiple pages.
144146
# The latter case (1 docx table spanning >1 pages) is transparent to the extraction logic; i.e. python-docx

0 commit comments

Comments
 (0)