You've already forked PythonLib
mirror of
https://github.com/lifebottle/PythonLib.git
synced 2026-02-13 15:25:50 -08:00
Fixing path to use for XMLs when inserting menu files
This commit is contained in:
@@ -12,7 +12,7 @@ import lxml.etree as etree
|
||||
|
||||
|
||||
tool = ToolsTOR.ToolsTOR("TBL_All.json")
|
||||
tool.extract_All_Menu()
|
||||
tool.insert_Menu_File("../Data/TOR/Disc/Original/SLPS_254.50")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ class ToolsTales:
|
||||
new_text_offsets = dict()
|
||||
file_node = [ele for ele in self.menu_files_json if ele['File_Extract'] == menu_file_path][0]
|
||||
|
||||
xml_file_name = "../Data/{}/Menu/XML/".format(self.gameName) + self.get_file_name(menu_file_path)+'.xml'
|
||||
xml_file_name = "../{}/Data/{}/Menu/XML/".format(self.repo_name, self.gameName) + self.get_file_name(menu_file_path)+'.xml'
|
||||
tree = etree.parse(xml_file_name)
|
||||
root = tree.getroot()
|
||||
|
||||
@@ -646,9 +646,9 @@ class ToolsTales:
|
||||
sections_end = [ section['Text_End'] for section in file_node['Sections'] if section['Text_Start'] > 0 ]
|
||||
base_offset = file_node['Base_Offset']
|
||||
|
||||
print(sections_start)
|
||||
|
||||
#Copy the original file
|
||||
new_file_path = file_node['File_New']
|
||||
new_file_path = "../Data/TOR/Menu/New/{}".format(os.path.basename(file_node['File_Original']))
|
||||
shutil.copy( file_node['File_Extract'], new_file_path)
|
||||
|
||||
#Open the new file with r+b
|
||||
@@ -660,7 +660,7 @@ class ToolsTales:
|
||||
section_max = max( sections_end )
|
||||
|
||||
ele = [ele for ele in root.findall("Strings") if ele.find('Section').text == "Armor"][0]
|
||||
print(ele)
|
||||
|
||||
for entry_node in root.iter("Entry"):
|
||||
|
||||
if menu_file.tell() < section_max:
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user