Skip to content

Commit

Permalink
fix annex conversion script
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Dec 8, 2016
1 parent a7e1b49 commit 2395ff7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Examples/ConvertBuildingsReferenceToCSV.py
Expand Up @@ -8,6 +8,12 @@ def convertDir(indir,outdir):
for fil in os.listdir(indir):
print "Converting file: %s\n" % indir+"/"+fil
with open(indir+"/"+fil) as f:
# skip FMU files!
if 'statistics-fmu-dependencies' in f.read():
print "... skipping FMU file\n"
continue
else:
f.seek(0)
v = {}
for line in f.readlines():
line = line.strip().split('=')
Expand All @@ -22,7 +28,12 @@ def convertDir(indir,outdir):
raise Exception("Assumed buildings result format has exactly 101 data points")
v[line[0]] = l
keys = v.keys()
#for key in keys :
# print key + "\n"
#try:
keys.remove('time')
#except ValueError:
# pass # no nothing
keys.sort()
keys = ['time'] + keys
values = [v[key] for key in keys]
Expand Down

0 comments on commit 2395ff7

Please sign in to comment.