Diff of /codesys-ide/scripts/export-documentation.py [df8782] .. [33820c]  Maximize  Restore

Switch to side-by-side view

--- a/codesys-ide/scripts/export-documentation.py
+++ b/codesys-ide/scripts/export-documentation.py
@@ -16,6 +16,21 @@
     def aborting(self):
         return False;
 
+
+def parseObj(treeobj, depth=0):
+    objs = list()
+    if not treeobj.is_device:
+       objs.append(treeobj)
+    for child in treeobj.get_children(False):
+        objs += parseObj(child, depth+1)
+    return objs
+
+def parseProj(proj):
+    objs = list()
+    for obj in proj.get_children():
+       objs += parseObj(obj)
+    return objs
+
 class SearchBuildDo(helper.SearchBuild):
     # Build rules for:
     # - *.library -> *.compiled-library
@@ -29,7 +44,9 @@
         print("%s -> %s\n" % (filename, mdname))
 
         proj = projects.open(filename)
-	proj.export_xml(reporter, proj.get_children(False), tempname, recursive = True)
+        objs = parseProj(proj)
+#	proj.export_xml(reporter, proj.get_children(False), tempname, recursive = True)
+	proj.export_xml(reporter, objs, tempname, recursive = False, declarations_as_plaintext = True)
 
 	# XSLT transform
 	print("Transform file with %s" % xslfile)
@@ -51,9 +68,12 @@
 
         return artifacts
 
+
 scriptpath = os.path.abspath(os.path.dirname(sys.argv[0]))
 
 sb = SearchBuildDo()
 sb.search(".library", ".")
 sb.search(".project", ".")
 sb.save(".", ".drone-artifacts")
+
+