Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix path
  • Loading branch information
Klaus Thoden committed Nov 14, 2018
1 parent b1eade6 commit ba6a914
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fix_tei.py
Expand Up @@ -48,8 +48,16 @@

TMP_DIR = os.path.expanduser("tmp_files")

RUNNING_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
logging.debug("The script is run from {}".format(RUNNING_DIRECTORY))
TEI_BOILERPLATE = os.path.sep.join([RUNNING_DIRECTORY, "data", "tei_boilerplate.cfg"])
print(TEI_BOILERPLATE)
if not os.path.exists(TEI_BOILERPLATE):
logging.error("Could not find TEI boilerplate config. Exiting.")
sys.exit()

BOILERPLATES = configparser.ConfigParser()
BOILERPLATES.read("data/tei_boilerplate.cfg")
BOILERPLATES.read(TEI_BOILERPLATE)

def get_place_in_xml_tree(element, tree):
"""Find out the position of an element in a tree.
Expand Down

0 comments on commit ba6a914

Please sign in to comment.