add the software list to the machine description

This commit is contained in:
Kelvin Sherlock 2021-02-23 22:41:26 -05:00
parent 521d33ba55
commit 9a7b5e6af0
1 changed files with 8 additions and 0 deletions

View File

@ -167,6 +167,11 @@ def find_media(parent, include_slots=False):
if not media: return None
return media
def find_software(parent):
swl = parent.findall("./softwarelist")
return [x.get("name") + ".xml" for x in swl]
devices = {}
p = argparse.ArgumentParser()
@ -256,6 +261,9 @@ for m in machines:
data[s] = tmp
data["software"] = find_software(machine)
path = "../Ample/Resources/{}.plist".format(m)
with open(path, "w") as f:
f.write(to_plist(data))