diff --git a/src/imxml2django.py b/src/imxml2django.py index e1ec4ba..c19a7f9 100755 --- a/src/imxml2django.py +++ b/src/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-04-08 17:46:10 (kthoden)> +# Time-stamp: <2020-05-25 09:25:29 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -1096,7 +1096,7 @@ def treat_verselines(verse_element): # Process Section Title xmlEOAsection = etree.Element("EOAsection") xmlEOAsection.set("order", str(intObjectNumber)) - if xmlChapterChild.get("n") != "nonumber": + if xmlChapterChild.get("rend") != "nonumber": xmlEOAsection.set("id", xmlChapterChild.get("id")) xmlEOAsection.set("number", dictSections[xmlChapterChild.get("id")]) intObjectNumber += 1 @@ -1110,7 +1110,7 @@ def treat_verselines(verse_element): # Process Subsection Title xmlEOAsubsection = etree.Element("EOAsubsection") xmlEOAsubsection.set("order", str(intObjectNumber)) - if xmlSectionChild.get("n") != "nonumber": + if xmlSectionChild.get("rend") != "nonumber": xmlEOAsubsection.set("id", xmlSectionChild.get("id")) xmlEOAsubsection.set("number", dictSections[xmlSectionChild.get("id")]) intObjectNumber += 1 diff --git a/src/imxml2epub.py b/src/imxml2epub.py index 7511bcb..4359138 100755 --- a/src/imxml2epub.py +++ b/src/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-04-06 08:53:49 (kthoden)> +# Time-stamp: <2020-05-25 09:30:01 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -724,7 +724,7 @@ def add_css_snippet(css_snippet, css_file): idSection = xmlSection.get("id") strHeadline = xmlSection.find("h2").text or "" logging.info(strHeadline) - if xmlSection.get("n") != "nonumber": + if xmlSection.get("rend") != "nonumber": xmlSection.find("h2").text = str(dictSections[idSection]) + " " + strHeadline else: xmlSection.find("h2").text = strHeadline @@ -736,7 +736,7 @@ def add_css_snippet(css_snippet, css_file): idSection = xmlSubsection.get("id") strHeadline = xmlSubsection.find("h3").text or "" logging.info(strHeadline) - if xmlSubsection.get("n") != "nonumber": + if xmlSubsection.get("rend") != "nonumber": xmlSubsection.find("h3").text = str(dictSections[idSection]) + " " + strHeadline else: xmlSubsection.find("h3").text = strHeadline