Skip to content

Commit

Permalink
Copy cover image
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Apr 9, 2020
1 parent 97391b1 commit 2114e80
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/eoatex2imxml.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-03-04 12:19:55 (kthoden)>
# Time-stamp: <2020-04-08 19:03:16 (kthoden)>

"""
Converts Latex files into a customized DocBook XML file.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2114e80

Please sign in to comment.