1234567891011121314151617181920 |
- from glob import glob
- from json import load
- from os import path
- from pycs import ApplicationStatus
- class LabelManager:
- def __init__(self, app_status: ApplicationStatus):
-
-
- for folder in glob('labels/*'):
-
- with open(path.join(folder, 'configuration.json'), 'r') as file:
- label = load(file)
- label['path'] = folder
- label_id = label['id']
- app_status['labels'][label_id] = label
|