]> granicus.if.org Git - esp-idf/commitdiff
docs: list kconfig components alphabetically via component name
authorRenz Christian Bagaporo <renz@espressif.com>
Thu, 20 Dec 2018 11:57:46 +0000 (19:57 +0800)
committerRenz Christian Bagaporo <renz@espressif.com>
Thu, 20 Dec 2018 11:57:46 +0000 (19:57 +0800)
docs/conf_common.py

index 17fcc7f0e90e4ba2c8b0ff00c1fc051da4fa2723..6153e51ccf1b887d087958c48859b38d63d945aa 100644 (file)
@@ -63,6 +63,9 @@ call_with_python('../gen-dxd.py')
 def find_component_files(parent_dir, target_filename):
     parent_dir = os.path.abspath(parent_dir)
     result = []
+
+    component_files = dict()
+
     for (dirpath, dirnames, filenames) in os.walk(parent_dir):
         try:
             # note: trimming "examples" dir as MQTT submodule
@@ -71,8 +74,14 @@ def find_component_files(parent_dir, target_filename):
         except ValueError:
             pass
         if target_filename in filenames:
-            result.append(os.path.join(dirpath, target_filename))
-    print("List of %s: %s" % (target_filename, ", ".join(result)))
+            component_files[os.path.basename(dirpath)] = os.path.join(dirpath, target_filename)
+
+    components = sorted(component_files.keys())
+
+    for component in components:
+        result.append(component_files[component])
+
+    print("List of %s: %s" % (target_filename, ", ".join(components)))
     return result