nrcan_catalog_creator/main.py

28 lines
713 B
Python
Raw Permalink Normal View History

import os
2023-02-22 05:35:30 -05:00
import opaque_surfaces
import transparent_surfaces
import archetypes
import configuration as c
import json
print('compacting constructions')
with open(c.opaque_surfaces_path, 'r') as f:
opaque = json.load(f)
with open(c.transparent_surfaces_path, 'r') as f:
transparent = json.load(f)
os.remove(str(c.opaque_surfaces_path))
os.remove(str(c.transparent_surfaces_path))
constructions = dict(opaque_surfaces=opaque['opaque_surfaces'],
transparent_surfaces=transparent['transparent_surfaces'],
materials=opaque['materials'])
with open(c.nrcan_constructions, 'w') as f:
2023-02-22 08:06:01 -05:00
json.dump(constructions, f, indent=2)
2023-02-22 05:35:30 -05:00
print('NRCAN catalog successfully created')