diff --git a/imxml2epub.py b/imxml2epub.py index 06f766b..f42278e 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -707,12 +707,14 @@ class FootnoteError(Exception): don't try to mix-and-match """ pass +# class FootnoteError ends here intTechnicalChapterNumber = 1 for xmlChapter in xmlChapters: groupings = libeoaconvert.get_bigfoot_data(xmlChapter) xmlFootnotes = list(xmlChapter.findall(".//note")) + print("here come the footnotes. found", len(xmlFootnotes)) has_old = 0 != len(xmlFootnotes) has_new = 0 != len( [ # flatten the association list whose values are lists, so we can take the length @@ -888,7 +890,6 @@ class FootnoteError(Exception): xmlHyperlinks = xmlChapter.findall(".//xref") for xmlHyperlink in xmlHyperlinks: strURL = xmlHyperlink.get('url') - print(strURL) if strURL.startswith("http://") == False: if strURL.startswith("https://") == False: strURL = "http://" + strURL @@ -1082,7 +1083,6 @@ class FootnoteError(Exception): xmlLetterheads = xmlChapter.xpath(".//EOAletterhead") for xmlLetterhead in xmlLetterheads: xmlRecipient = xmlLetterhead.find(".//Recipient") - print(etree.tostring(xmlRecipient)) xmlRecipient.tag = "p" xmlRecipient.getchildren()[0].tag = "em" xmlArchive = xmlLetterhead.find(".//Archive") @@ -1112,7 +1112,7 @@ class FootnoteError(Exception): xmlHeader = xmlTranscription.find(".//EOAtranscriptedheader") xmlHeader.tag = "tr" xmlLeftHeader = xmlTranscription.find(".//Leftheader") - print(xmlLeftHeader.text) + # print(xmlLeftHeader.text) xmlLeftHeader.tag = "td" xmlLeftHeader.set("style", "width: 50%") xmlRightHeader = xmlTranscription.find(".//Rightheader") @@ -1153,7 +1153,7 @@ class FootnoteError(Exception): for xmlTable in xmlTables: xmlRawTable = xmlTable.find(".//table") strTableCaption = xmlTable.find(".//EOAtablecaption").text or "" - print("Working on ", strTableCaption) + # print("Working on ", strTableCaption) if strTableCaption != "nonumber": intTableNumber = dictTables[xmlTable.find(".//EOAtablelabel").text] xmlTableCaption = etree.Element("p")