Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Mar 2, 2020
1 parent bcadf50 commit 2a9ae52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/imxml2epub.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2020-02-28 17:33:23 (kthoden)>
# Time-stamp: <2020-02-28 18:10:10 (kthoden)>

""" Convert a customized DocBook XML file into a set of files that
constitute the contents of an EPUB file.
Expand Down Expand Up @@ -158,10 +158,10 @@
else:
logging.error("Found no publication.cfg. Exiting")
sys.exit( 1 )
if not os.path.exists( OUTPUT_DIR / "cover.jpg"):
logging.info(f"The file cover.jpg in {OUTPUT_DIR} directory is missing.")
if os.path.exists(PUBLICATION_DIR / "Cover.jpg"):
shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "cover.jpg")
if not os.path.exists( OUTPUT_DIR / "Cover.jpg"):
logging.info(f"The file Cover.jpg in {OUTPUT_DIR} directory is missing.")
if os.path.exists(INPUT_DIR / "Cover.jpg"):
shutil.copy(INPUT_DIR / "Cover.jpg", OUTPUT_DIR / "cover.jpg")
logging.info("Copied from current directory.")
else:
logging.error("No coverfile found. You can create a temporary one with the mkimage.py script")
Expand Down

0 comments on commit 2a9ae52

Please sign in to comment.