20 for elem
in directory.findall(
"{https://github.com/ChimeraTK/ApplicationCore}variable"):
21 varname = elem.attrib[
"name"]
22 vartype = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}value_type").text
23 vardirection = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}direction").text
24 varunit = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}unit").text
27 vardescription = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}description").text
28 if not vardescription:
30 varlength = int(elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}numberOfElements").text)
32 if vardirection ==
"application_to_control_system":
33 thetype = vartype +
" (ro)"
37 thetype = thetype +
" (" + str(varlength) +
" elements)"
39 print(
"| " + varname +
" | " + vartype +
" | " + varunit +
40 " | " + vardescription[stripDescriptionPrefix:] +
" |")
42 for elem
in directory.findall(
"{https://github.com/ChimeraTK/ApplicationCore}directory"):
44 for subelem
in elem.findall(
"{https://github.com/ChimeraTK/ApplicationCore}variable"):
45 vardescription = subelem.find(
"{https://github.com/ChimeraTK/ApplicationCore}description").text
46 if not vardescription:
48 if dirdescription ==
"":
49 dirdescription = vardescription
53 print(
"^ " + cwd +
"/" + elem.attrib[
"name"] +
" - " + dirdescription[:-2] +
" ||||")
55 parseDirectory(elem, cwd +
"/" + elem.attrib[
"name"], len(dirdescription) + 1)