From 273b3f0291e88c213942d430a5807cb56e891240 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 26 Nov 2019 12:38:24 +0100 Subject: [PATCH] Copy publication.cfg to output/imxml to be picked up there The rationale behind this is that with the tei2imxml, the publication.cfg is created in this step and also dumped in output/imxml --- src/eoatex2imxml.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/eoatex2imxml.py b/src/eoatex2imxml.py index 5cc801f..f596957 100755 --- a/src/eoatex2imxml.py +++ b/src/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-11-26 12:20:04 (kthoden)> +# Time-stamp: <2019-11-26 12:35:10 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -196,6 +196,13 @@ if not os.path.exists( DEBUG_DIR ): os.mkdir( DEBUG_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(f"Found no publication.cfg in {INPUT_DIR}. Exiting") + sys.exit( 1 ) + # Copy Support-Files from /Library/MPIWG to current directory shutil.copy(SUPPORT_PATH / "classes.dtd", OUTPUT_DIR) shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", OUTPUT_DIR)