2023-02-22 06:40:44 -05:00
|
|
|
import os
|
|
|
|
|
2023-02-22 05:35:30 -05:00
|
|
|
import opaque_surfaces
|
|
|
|
import transparent_surfaces
|
|
|
|
import archetypes
|
2023-02-22 06:40:44 -05:00
|
|
|
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))
|
|
|
|
|
2023-02-22 08:09:34 -05:00
|
|
|
constructions = dict(opaque_surfaces=opaque['opaque_surfaces'],
|
|
|
|
transparent_surfaces=transparent['transparent_surfaces'],
|
|
|
|
materials=opaque['materials'])
|
2023-02-22 06:40:44 -05:00
|
|
|
|
|
|
|
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 06:40:44 -05:00
|
|
|
|
2023-02-22 05:35:30 -05:00
|
|
|
|
|
|
|
print('NRCAN catalog successfully created')
|