import json, os
metadata = json.load(open('../input/object.json', 'r'))

print('Augmenting object.json')

images = metadata.get('images', [])
for name in sorted(os.listdir('../output/screenshots')):
  print('Adding screenshot:', name)
  images.append('screenshots/' + name)

metadata['images'] = images

print('Writing out output object')
json.dump(metadata, open('../output/object.json', 'w+'))

print('Done')
