Skip to content

Commit

Permalink
Remove chapter abstract from chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Apr 6, 2020
1 parent 547fbad commit bc43342
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tei2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,17 @@ def handle_refs_default(ref):

# Epigraphs are handled in the subsequent steps


#####################
# Chapter abstracts #
#####################

chapter_abstracts = xml_tree.xpath("//t:body//t:ab[@type='chapterabstract']", namespaces=NS_MAP)
for abstract in chapter_abstracts:
logging.info("Removing chapter abstract, see https://github.molgen.mpg.de/EditionOpenAccess/django-eoapublications/issues/3")
abstract.tag = "elementtoberemoved"


##############
# References #
##############
Expand Down Expand Up @@ -1817,6 +1828,7 @@ def main():
xml_add_bib = add_bibliography_anthology(body_transformed, formatted_references_dict)

etree.strip_tags(xml_add_bib, "tagtobestripped")
etree.strip_elements(xml_add_bib, "elementtoberemoved")
libeoaconvert.debug_xml_here(xml_add_bib, "xml_add_bib", DEBUG_DIR)

elements_with_ids = xml_add_bib.xpath("//div1 | //div2 | //div3 | //note | //item | //table | //EOAfigure/anchor | //EOAequation | //formula | //theorem")
Expand Down

0 comments on commit bc43342

Please sign in to comment.