From 6080f67f1c480f700cd78e8744f35a9e4689a1e8 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 28 Feb 2020 17:34:32 +0100 Subject: [PATCH] Fixed paths --- src/imxml2epub.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/imxml2epub.py b/src/imxml2epub.py index 1ebd66a..5c76b1b 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-01-16 13:04:22 (kthoden)> +# Time-stamp: <2020-02-28 17:33:23 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -152,9 +152,9 @@ # Check for folder and necessary files if not os.path.exists( OUTPUT_DIR / "publication.cfg"): logging.info(f"The publication.cfg file is missing in {OUTPUT_DIR} directory.") - if os.path.exists(PUBLICATION_DIR / "publication.cfg"): - shutil.copy(PUBLICATION_DIR / "publication.cfg", OUTPUT_DIR) - logging.info(f"Copied from {PUBLICATION_DIR}.") + if os.path.exists(INPUT_DIR / "publication.cfg"): + shutil.copy(INPUT_DIR / "publication.cfg", OUTPUT_DIR) + logging.info(f"Copied from {INPUT_DIR}.") else: logging.error("Found no publication.cfg. Exiting") sys.exit( 1 ) @@ -1036,7 +1036,7 @@ class FootnoteError(Exception): for xmlChapter in xmlChapters: groupings = libeoaconvert.get_bigfoot_data(xmlChapter) xmlFootnotes = list(xmlChapter.findall(".//note")) - logging.info("here come the footnotes. found" + str(len(xmlFootnotes))) + logging.info("Here come the footnotes. Found " + str(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