Files
soundshot/prepare_config.py
2025-07-22 14:04:27 -05:00

11 lines
319 B
Python

import json
with open("settings.json") as f:
cfg = json.load(f)
with open("project_settings.cmake", "w") as out:
out.write(f'set(PROJECT_NAME "{cfg["project_name"]}")\n')
out.write(f'set(CHIP "{cfg["chip"]}")\n')
out.write(f'set(PORT "{cfg["port"]}")\n')
out.write(f'set(BAUD "{cfg["baud"]}")\n')