Browse Source

chnage the tools to make them more universal

rachels 2 years ago
parent
commit
e85ec0e1ca
3 changed files with 7 additions and 7 deletions
  1. 5 5
      tools/txtmerge.py
  2. 1 1
      tools/txtsplit.py
  3. 1 1
      tools/txtsplit3.py

+ 5 - 5
tools/txtmerge.py

@@ -8,16 +8,16 @@ import re
 import io 
 import xml.etree.ElementTree as ET
 
-assert len(sys.argv) == 3, "usage:\ntxtmerge.py <input_dir> <output_file_name>"
-idir = str(sys.argv[1])
-oname = str(sys.argv[2])
+assert len(sys.argv) == 4, "usage:\ntxtmerge.py <input_file_name> <input_dir> <output_file_name>"
+iname = str(sys.argv[1])
+idir = str(sys.argv[2])
+oname = str(sys.argv[3])
 
 # read the project xml file first
 # let's do this later in order to implement directory structure
-tree = ET.parse('mod_wlife.qproj')
+tree = ET.parse(iname)
 root = tree.getroot()
 
-
 ofile = io.open(oname, 'w', encoding='utf-16', newline='\r\n')
 
 for location in root.iter('Location'):

+ 1 - 1
tools/txtsplit.py

@@ -16,7 +16,7 @@ odir = str(sys.argv[2])
 # read the project xml file first
 # let's do this later in order to implement directory structure
 """
-tree = ET.parse('mod_wlife.qproj')
+tree = ET.parse(iname)
 root = tree.getroot()
 """
 

+ 1 - 1
tools/txtsplit3.py

@@ -16,7 +16,7 @@ odir = str(sys.argv[2])
 # read the project xml file first
 # let's do this later in order to implement directory structure
 """
-tree = ET.parse('mod_wlife.qproj')
+tree = ET.parse(iname)
 root = tree.getroot()
 """