Skip to content

Commit

Permalink
Fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Jul 12, 2021
1 parent ae7d323 commit 25ecb0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/eoatex2imxml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2021-07-08 18:38:34 (kthoden)>
# Time-stamp: <2021-07-09 13:47:28 (kthoden)>

"""
Converts Latex files into a customized DocBook XML file.
Expand Down Expand Up @@ -1222,7 +1222,7 @@ def move_anchors(xml_tree):
next_paragraph = anchor.xpath("following-sibling::p[1]")[0]
para_pos = libeoaconvert.get_place_in_xml_tree(next_paragraph, anchor_parent)
next_paragraph.insert(0, anchor)
logging.info(f"Moved the anchor {para_pos-anchor_pos} positions down the tree.")
logging.info(f"Moved the anchor {libeoaconvert.plural(para_pos-anchor_pos, 'position')} down the tree.")
except IndexError:
logging.warning(f"This didn't work out: {anchor.get('id')}")
pass
Expand Down
3 changes: 1 addition & 2 deletions src/imxml2django.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2021-07-09 11:16:13 (kthoden)>
# Time-stamp: <2021-07-09 13:48:22 (kthoden)>

"""
Create an XML file that can be inserted into the Django database
Expand Down Expand Up @@ -1705,7 +1705,6 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe
strChapterOrder = xmlParent.get("order")
elif xmlReferenceRefTarget in dictSections:
logging.debug("Found link to section")
logging.info(f"It's {xmlReferenceRefTarget}")
strResult = dictSections[xmlReferenceRefTarget]
xmlEOAsection = xmlEOAdocument.xpath(f".//EOAsection[@id='{xmlReferenceRefTarget}']")
if len(xmlEOAsection) == 0:
Expand Down

0 comments on commit 25ecb0f

Please sign in to comment.