Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed May 20, 2020
1 parent 99f229a commit 8418945
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/eoatex2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,12 +1096,15 @@ def bibl_info_from_xml(
):
if xmlTree.find(".//EOAbibliographydatabase") is not None:
bib_database = xmlTree.find(".//EOAbibliographydatabase").text
logging.info("The bibliography database is %s", bib_database)
else:
return None

bib_type = xmlTree.find(".//EOAbibliographytype").text
if bib_type not in ["monograph", "anthology", "monograph-numeric", "anthology-numeric"]:
raise( Exception(f"The bibtype must be one of {','.join[bib_type]}. Exiting") )
else:
logging.info("The bibliography type is %s", bib_type)

return (bib_type, bib_database)

Expand Down Expand Up @@ -1447,7 +1450,7 @@ def add_bibliography_to_xml(
# If Bibliography-Type is anthology search for EOAbibliography and make one per chapter
elif bib_type == "anthology":
for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1):
logging.debug(f"Looking at chapter {intChapterNumber}.")
logging.info(f"Looking at chapter {intChapterNumber}.")
keyword_to_print_bibl_el = insert_bibliographies(
xmlChapter,
xmlChapter.get("language"),
Expand Down

0 comments on commit 8418945

Please sign in to comment.