diff --git a/data_model/clusters/AdminAssistedCommissioningFlows-BasicCommissioningMethod(BCM).xml b/data_model/clusters/AdminAssistedCommissioningFlows-BasicCommissioningMethod(BCM).xml
deleted file mode 100644
index a278d8c0ef5661..00000000000000
--- a/data_model/clusters/AdminAssistedCommissioningFlows-BasicCommissioningMethod(BCM).xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/AdminAssistedCommissioningFlows-EnhancedCommissioningMethod(ECM).xml b/data_model/clusters/AdminAssistedCommissioningFlows-EnhancedCommissioningMethod(ECM).xml
deleted file mode 100644
index 846ca54b44330d..00000000000000
--- a/data_model/clusters/AdminAssistedCommissioningFlows-EnhancedCommissioningMethod(ECM).xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/AdminAssistedCommissioningFlows-Introduction.xml b/data_model/clusters/AdminAssistedCommissioningFlows-Introduction.xml
deleted file mode 100644
index 0d4b9deee7b99f..00000000000000
--- a/data_model/clusters/AdminAssistedCommissioningFlows-Introduction.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/AdminAssistedCommissioningFlows-OpenCommissioningWindow.xml b/data_model/clusters/AdminAssistedCommissioningFlows-OpenCommissioningWindow.xml
deleted file mode 100644
index dca77e4f1ac8d5..00000000000000
--- a/data_model/clusters/AdminAssistedCommissioningFlows-OpenCommissioningWindow.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/BulkDataExchange.xml b/data_model/clusters/BulkDataExchange.xml
deleted file mode 100644
index 50b368d19f74e4..00000000000000
--- a/data_model/clusters/BulkDataExchange.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/CommissioningFlows.xml b/data_model/clusters/CommissioningFlows.xml
deleted file mode 100644
index 29c28ea8bdb8ef..00000000000000
--- a/data_model/clusters/CommissioningFlows.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/DeviceCommissioningFlows.xml b/data_model/clusters/DeviceCommissioningFlows.xml
deleted file mode 100644
index c691c471b63880..00000000000000
--- a/data_model/clusters/DeviceCommissioningFlows.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/DistributedComplianceLedger.xml b/data_model/clusters/DistributedComplianceLedger.xml
deleted file mode 100644
index c3608f82c37c61..00000000000000
--- a/data_model/clusters/DistributedComplianceLedger.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/OTAFileFormat.xml b/data_model/clusters/OTAFileFormat.xml
deleted file mode 100644
index 2f19fdb467bc4d..00000000000000
--- a/data_model/clusters/OTAFileFormat.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/VideoPlayerArchitecture.xml b/data_model/clusters/VideoPlayerArchitecture.xml
deleted file mode 100644
index dcc4f37603db27..00000000000000
--- a/data_model/clusters/VideoPlayerArchitecture.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/appliances.xml b/data_model/clusters/appliances.xml
deleted file mode 100644
index 4912fbea967cc4..00000000000000
--- a/data_model/clusters/appliances.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/closures.xml b/data_model/clusters/closures.xml
deleted file mode 100644
index fc16e7e01c40f7..00000000000000
--- a/data_model/clusters/closures.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/general.xml b/data_model/clusters/general.xml
deleted file mode 100644
index a36a99a4b04648..00000000000000
--- a/data_model/clusters/general.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/hvac.xml b/data_model/clusters/hvac.xml
deleted file mode 100644
index a1100127707991..00000000000000
--- a/data_model/clusters/hvac.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/lighting.xml b/data_model/clusters/lighting.xml
deleted file mode 100644
index 0bdc61f83a11cb..00000000000000
--- a/data_model/clusters/lighting.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/meas_and_sense.xml b/data_model/clusters/meas_and_sense.xml
deleted file mode 100644
index 540107bf47767f..00000000000000
--- a/data_model/clusters/meas_and_sense.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/media.xml b/data_model/clusters/media.xml
deleted file mode 100644
index cc2deaa3b765f5..00000000000000
--- a/data_model/clusters/media.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/robots.xml b/data_model/clusters/robots.xml
deleted file mode 100644
index 7b93d445a003b9..00000000000000
--- a/data_model/clusters/robots.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py
index 6c476851830d62..0a536df440cfd8 100755
--- a/scripts/spec_xml/generate_spec_xml.py
+++ b/scripts/spec_xml/generate_spec_xml.py
@@ -55,11 +55,16 @@ def main(scraper, spec_root, output_dir, dry_run):
clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters'))
dm_clusters_list = ['ACL-Cluster.adoc', 'Binding-Cluster.adoc', 'bridge-clusters.adoc',
'Descriptor-Cluster.adoc', 'Group-Key-Management-Cluster.adoc', 'Label-Cluster.adoc']
+ sdm_exclude_list = ['AdminAssistedCommissioningFlows.adoc', 'BulkDataExchange.adoc', 'CommissioningFlows.adoc',
+ 'DeviceCommissioningFlows.adoc', 'DistributedComplianceLedger.adoc', 'OTAFileFormat.adoc']
+ app_exclude_list = ['appliances.adoc', 'closures.adoc', 'general.adoc',
+ 'hvac.adoc', 'lighting.adoc', 'meas_and_sense.adoc', 'robots.adoc']
+ media_exclude_list = ['media.adoc', 'VideoPlayerArchitecture.adoc']
if not os.path.exists(clusters_output_dir):
os.makedirs(clusters_output_dir)
- def scrape_cluster(filename):
+ def scrape_cluster(filename: str) -> None:
xml = os.path.basename(filename).replace('.adoc', '.xml')
xml_path = os.path.abspath(os.path.join(clusters_output_dir, xml))
cmd = [scraper, 'cluster', filename, xml_path, '-nd']
@@ -68,12 +73,15 @@ def scrape_cluster(filename):
else:
subprocess.run(cmd)
- for filename in glob.glob(f'{sdm_clusters_dir}/*.adoc'):
- scrape_cluster(filename)
- for filename in glob.glob(f'{app_clusters_dir}/*.adoc'):
- scrape_cluster(filename)
- for filename in glob.glob(f'{media_clusters_dir}/*.adoc'):
- scrape_cluster(filename)
+ def scrape_all_clusters(dir: str, exclude_list: list[str] = []) -> None:
+ for filename in glob.glob(f'{dir}/*.adoc'):
+ if os.path.basename(filename) in exclude_list:
+ continue
+ scrape_cluster(filename)
+
+ scrape_all_clusters(sdm_clusters_dir, sdm_exclude_list)
+ scrape_all_clusters(app_clusters_dir, app_exclude_list)
+ scrape_all_clusters(media_clusters_dir, media_exclude_list)
for f in dm_clusters_list:
filename = f'{dm_clusters_dir}/{f}'
scrape_cluster(filename)