2015-04-09 18:01:33 -07:00
|
|
|
# Copyright 2007 Baptiste Lepilleur
|
|
|
|
# Distributed under MIT license, or public domain if desired and
|
|
|
|
# recognized in your jurisdiction.
|
|
|
|
# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
|
|
|
|
2014-11-19 23:30:47 -06:00
|
|
|
from __future__ import print_function
|
2007-06-14 21:01:26 +00:00
|
|
|
import glob
|
|
|
|
import os.path
|
2015-01-24 15:29:52 -06:00
|
|
|
for path in glob.glob('*.json'):
|
2007-06-14 21:01:26 +00:00
|
|
|
text = file(path,'rt').read()
|
|
|
|
target = os.path.splitext(path)[0] + '.expected'
|
2015-01-24 15:29:52 -06:00
|
|
|
if os.path.exists(target):
|
2014-11-19 23:30:47 -06:00
|
|
|
print('skipping:', target)
|
2007-06-14 21:01:26 +00:00
|
|
|
else:
|
2014-11-19 23:30:47 -06:00
|
|
|
print('creating:', target)
|
2007-06-14 21:01:26 +00:00
|
|
|
file(target,'wt').write(text)
|
|
|
|
|