Apertura del repositorio

This commit is contained in:
2025-05-24 18:09:39 -03:00
parent 76e6359dad
commit d883ddd0d0
35253 changed files with 2891973 additions and 2 deletions
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
# open the avatar_lad.xml file and load it as a dom object
from xml.dom import minidom
import os
import sys
import argparse
parser = argparse.ArgumentParser()
# add positional argument for avatar_lad.xml
parser.add_argument("avatar_lad", help="path to avatar_lad.xml file")
args = parser.parse_args()
# using minidom open the avatar_lad.xml file and load it as a dom object
# open the avatar_lad.xml file and load it as a dom object
dom = minidom.parse(open(args.avatar_lad, "rb"))
# get the first element in the dom object
root = dom.documentElement
# find the "skeleton" child node
skeleton = root.getElementsByTagName("skeleton")[0]
for child in skeleton.childNodes:
if child.nodeType == child.ELEMENT_NODE:
# if tagname is "attachment_point" and 'hud' attribute doesn't exist print id and name
if child.tagName == "attachment_point":
if not child.hasAttribute("hud"):
print(f"{child.getAttribute('id')} - {child.getAttribute('name')}")
else:
print(f"{child.getAttribute('id')} - [HUD] {child.getAttribute('name')}")