19 for elem
in directory.findall(
"{https://github.com/ChimeraTK/ApplicationCore}variable") :
20 varname = elem.attrib[
"name"]
21 vartype = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}value_type").text
22 vardirection = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}direction").text
23 varunit = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}unit").text
26 vardescription = elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}description").text
27 if not vardescription :
29 varlength = int(elem.find(
"{https://github.com/ChimeraTK/ApplicationCore}numberOfElements").text)
31 if vardirection ==
"application_to_control_system" :
32 thetype=vartype+
" (ro)"
36 thetype=thetype+
" ("+str(varlength)+
" elements)"
38 print(
"| "+varname+
" | "+vartype+
" | "+varunit+
" | "+vardescription[stripDescriptionPrefix:]+
" |")
40 for elem
in directory.findall(
"{https://github.com/ChimeraTK/ApplicationCore}directory") :
42 for subelem
in elem.findall(
"{https://github.com/ChimeraTK/ApplicationCore}variable") :
43 vardescription = subelem.find(
"{https://github.com/ChimeraTK/ApplicationCore}description").text
44 if not vardescription :
46 if dirdescription ==
"" :
47 dirdescription = vardescription
51 print(
"^ "+cwd+
"/"+elem.attrib[
"name"]+
" - "+dirdescription[:-2]+
" ||||")
53 parseDirectory(elem, cwd+
"/"+elem.attrib[
"name"], len(dirdescription)+1)