()
| 273 | |
| 274 | |
| 275 | def save_toc(): |
| 276 | toc = {} |
| 277 | for key in classes: |
| 278 | c = key.split("_") |
| 279 | |
| 280 | if c[0] in toc: |
| 281 | toc[ c[0] ].append( c[1] ) |
| 282 | else: |
| 283 | toc[ c[0] ] = [ c[1] ] |
| 284 | |
| 285 | f = open(f'{file_path}modules.json', 'w') |
| 286 | f.write( json.dumps( toc, indent=2 ) ) |
| 287 | f.close() |
| 288 | |
| 289 | def save_class(data, name): |
| 290 | f = open(f'{file_path}class/{name}.json', 'w') |