Nicola Soranzo
2019-04-23 12:51:13 +01:00
parent faac99976b
commit 0faa479f94
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -14,18 +14,18 @@ def main():
# index range 1-1000, current sections/tools divided between 250-750
sectionindex = 250
sectionfactor = int(500 / len(root.getchildren()))
sectionfactor = int(500 / len(root))
for rootchild in root.getchildren():
for rootchild in root:
currentsectionlabel = ""
if (rootchild.tag == "section"):
sectionname = rootchild.attrib['name']
# per section tool index range 1-1000, current labels/tools
# divided between 20 and 750
toolindex = 250
toolfactor = int(500 / len(rootchild.getchildren()))
toolfactor = int(500 / len(rootchild))
currentlabel = ""
for sectionchild in rootchild.getchildren():
for sectionchild in rootchild:
if (sectionchild.tag == "tool"):
addToToolDict(sectionchild, sectionname, sectionindex, toolindex, currentlabel)
toolindex += toolfactor