28 lines
713 B
Python
28 lines
713 B
Python
import os
|
|
|
|
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:
|
|
json.dump(constructions, f, indent=2)
|
|
|
|
|
|
print('NRCAN catalog successfully created')
|