Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
CSL file in configuration
  • Loading branch information
Klaus Thoden committed Mar 15, 2018
1 parent 471bccb commit d40922e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 2 additions & 3 deletions eoatex2imxml.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*- # -*- coding: utf-8; mode: python -*-
# Time-stamp: <2018-02-13 14:25:58 (kthoden)> # Time-stamp: <2018-03-15 14:16:56 (kthoden)>


# license? # license?
__version__= "1.0" __version__= "1.0"
Expand Down Expand Up @@ -51,10 +51,9 @@
if options.CONFIG_FILE is not None: if options.CONFIG_FILE is not None:
CONFIG_FILE = os.path.abspath(options.CONFIG_FILE) CONFIG_FILE = os.path.abspath(options.CONFIG_FILE)
else: else:
# CONFIG_FILE = "/Users/kthoden/EOAKram/dev/EOASkripts/Skripten/eoaconvert.cfg"
CONFIG_FILE = os.path.dirname(sys.argv[0]) + "/config/eoaconvert.cfg" CONFIG_FILE = os.path.dirname(sys.argv[0]) + "/config/eoaconvert.cfg"


print("The configfile is ", CONFIG_FILE) logging.debug("The configfile is ", CONFIG_FILE)


# current biber is not compatible with this code # current biber is not compatible with this code
# switch TeX distribution to TeXLive2016, # switch TeX distribution to TeXLive2016,
Expand Down
9 changes: 6 additions & 3 deletions tei2imxml.py
Expand Up @@ -22,17 +22,20 @@
# assign ids top to bottom for the following elements: # assign ids top to bottom for the following elements:
# div1 div2 div3 note item table EOAfigure EOAequation formula theorem # div1 div2 div3 note item table EOAfigure EOAequation formula theorem


CONFIG_FILE = os.path.dirname(sys.argv[0]) + os.path.sep + "config" + os.path.sep +"eoaconvert.cfg"
# Reading the configuration file
CONFIG = configparser.ConfigParser()
CONFIG.read(CONFIG_FILE)

logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s') logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s')


ns_tei = "http://www.tei-c.org/ns/1.0" ns_tei = "http://www.tei-c.org/ns/1.0"
NS_MAP = {"t" : ns_tei} NS_MAP = {"t" : ns_tei}


TMP_DIR = os.path.expanduser("tmp_files") TMP_DIR = os.path.expanduser("tmp_files")
CSL_FILE = "/Users/kthoden/EOAKram/dev/eoa-csl/eoa.csl"
OUTPUT_DIR = os.path.expanduser("CONVERT") OUTPUT_DIR = os.path.expanduser("CONVERT")


# this is duplicated from libeoaconvert CSL_FILE = CONFIG['Auxiliaries']['CSL_FILE']
dictLangFootnotes = {"it" : "Note a piè pagina", "fr" : "notes en bas de page", "de" : "Fußnoten", "en" : "Footnotes"}


def get_publication_info(xml_tree): def get_publication_info(xml_tree):
"""Query the TEI document for metadata fields. """Query the TEI document for metadata fields.
Expand Down

0 comments on commit d40922e

Please sign in to comment.