diff --git a/eoaconvert.py b/eoaconvert.py index e698636..abde979 100755 --- a/eoaconvert.py +++ b/eoaconvert.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2018-02-13 13:18:39 (kthoden)> +# Time-stamp: <2018-02-13 14:25:58 (kthoden)> # license? __version__= "1.0" @@ -1155,10 +1155,6 @@ def cleanup(): bib_parent = xmlBibliography.getparent() bib_parent.tag = "div" - # bib_parent.set("order", "1") - - # xmlBibliography.getparent().tag = "div" - #xmlBibliography.addnext(xmlBibliographyDiv) ############### # new version # @@ -1549,6 +1545,16 @@ def cleanup(): xmlCitenumeric.set("class","citation") intChapterNumber += 1 +# this is somewhat luzzini-specific +bib_parent_element = xmlBibliography.getparent() +upper_div = bib_parent_element.xpath("./ancestor::div1")[0] +previous_div0 = upper_div.getparent() + +other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") +if len(other_content) > 0: + for element in other_content: + previous_div0.append(element) + # here followed the conversion to epub and the conversion to django.xml # both parts were removed and put into separate files.