File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
17
17
import glob
18
+ import json
18
19
import os
19
20
import re
20
21
import subprocess
@@ -176,13 +177,19 @@ def dump_cluster_ids(output_dir):
176
177
title = f'|{ title_id_decimal } |{ title_id_hex } |{ title_name } |\n '
177
178
hashes = f'|{ "-" * dec_len } |{ "-" * hex_len } |{ "-" * name_len } |\n '
178
179
s = title + hashes
180
+ json_dict = {id : c .name for id , c in sorted (clusters .items ())}
179
181
for id , cluster in sorted (clusters .items ()):
180
182
hex_id = f'0x{ id :04X} '
181
183
s += f'|{ id :<{dec_len }} |{ hex_id :<{hex_len }} |{ cluster .name :<{name_len }} |\n '
184
+
182
185
with open (DEFAULT_DOCUMENTATION_DIR , 'w' ) as fout :
183
186
fout .write (header )
184
187
fout .write (s )
185
188
189
+ json_file = os .path .join (clusters_output_dir , 'cluster_ids.json' )
190
+ with open (json_file , "w" ) as outfile :
191
+ json .dump (json_dict , outfile , indent = 2 )
192
+
186
193
187
194
if __name__ == '__main__' :
188
195
main ()
You can’t perform that action at this time.
0 commit comments