Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IntermediateXML file is stored in top level of imxml directory
  • Loading branch information
kthoden committed May 14, 2019
1 parent c69a307 commit cf0bc32
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions eoatex2imxml.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2019-05-14 11:58:08 (kthoden)>
# Time-stamp: <2019-05-14 17:09:18 (kthoden)>

"""
Converts Latex files into a customized DocBook XML file.
Expand Down Expand Up @@ -152,8 +152,6 @@
LATEX_DIR = Path ( args.latex_dir )
LOG_DIR = Path( args.log_dir )

CONVERT_DIR = OUTPUT_DIR / "CONVERT"
# CONVERT_DIR = os.getcwd() + os.path.sep + "CONVERT"
TEMP_DIR = OUTPUT_DIR / "tmp_files"
DEBUG_DIR = OUTPUT_DIR / "debug"

Expand Down Expand Up @@ -1705,7 +1703,7 @@ def make_indices_child_of_div0():
# both parts were removed and put into separate files.

intermediate_file_pre = TEMP_DIR / "IntermediateXMLFile_pre.xml"
intermediate_file = TEMP_DIR / "IntermediateXMLFile.xml"
intermediate_file = OUTPUT_DIR / "IntermediateXMLFile.xml"
ergebnisdatei = open(intermediate_file_pre, "w")
ergebnis = etree.tostring(xmlTree, pretty_print=True, encoding="unicode")
ergebnisdatei.write(ergebnis)
Expand Down
4 changes: 2 additions & 2 deletions imxml2django.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2019-05-10 16:19:24 (kthoden)>
# Time-stamp: <2019-05-14 17:09:54 (kthoden)>

"""
Create an XML file that can be inserted into the Django database
Expand Down Expand Up @@ -165,7 +165,7 @@
if not os.path.exists(DEBUG_DIR):
os.mkdir(DEBUG_DIR)

xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") )
xmlTree = etree.parse( str(INPUT_DIR / "IntermediateXMLFile.xml") )

libeoaconvert.debug_xml_here(
xmlTree,
Expand Down
4 changes: 2 additions & 2 deletions imxml2epub.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2019-05-14 17:06:15 (kthoden)>
# Time-stamp: <2019-05-14 17:10:09 (kthoden)>

""" Convert a customized DocBook XML file into a set of files that
constitute the contents of an EPUB file.
Expand Down Expand Up @@ -148,7 +148,7 @@

# Datei = open( TEMP_DIR / 'intermediate.log', 'w')

xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") )
xmlTree = etree.parse( str(INPUT_DIR / "IntermediateXMLFile.xml") )

with open(INPUT_DIR / "tmp_files" / 'data.pickle', 'rb') as f:
data = pickle.load(f)
Expand Down
2 changes: 1 addition & 1 deletion imxml2tei.py
Expand Up @@ -406,7 +406,7 @@ def main():
tei_root.append(tei_header)

tei_body = etree.SubElement(tei_root, "text")
intermediate_xml_tree = etree.parse("tmp_files/IntermediateXMLFile.xml")
intermediate_xml_tree = etree.parse("IntermediateXMLFile.xml")
tei_body_xml = transform_intermediate_xml(intermediate_xml_tree)
front_part = etree.SubElement(tei_body, "front")
front_contents_list = populate_front_part(PUB_CONFIG)
Expand Down

0 comments on commit cf0bc32

Please sign in to comment.