Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Code if index elements are in bibliography
  • Loading branch information
Klaus Thoden committed Feb 13, 2018
1 parent 922fe03 commit f626aa5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions 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"
Expand Down Expand Up @@ -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 #
Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit f626aa5

Please sign in to comment.