diff --git a/src/eoatex2imxml.py b/src/eoatex2imxml.py index afb5ef0..a4da8eb 100755 --- a/src/eoatex2imxml.py +++ b/src/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-03-04 12:19:55 (kthoden)> +# Time-stamp: <2020-04-08 19:03:16 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -203,6 +203,15 @@ else: logging.error(f"Found no publication.cfg in {INPUT_DIR}. Exiting") sys.exit( 1 ) +if os.path.exists(INPUT_DIR / "Cover.jpg"): + shutil.copy(INPUT_DIR / "Cover.jpg", OUTPUT_DIR / "Cover.jpg") + logging.info("Copied cover imag from input directory.") +elif os.path.exists(INPUT_DIR / "images/Cover.jpg"): + shutil.copy(INPUT_DIR / "images/Cover.jpg", OUTPUT_DIR / "Cover.jpg") + logging.info("Copied cover image from publication directory.") +else: + logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") + sys.exit( 1 ) # Copy Support-Files from /Library/MPIWG to current directory shutil.copy(SUPPORT_PATH / "classes.dtd", OUTPUT_DIR)