blob: 8e437d3ea15e2a95a0fa6f698dc871c13735bafb [file] [log] [blame] [edit]
#!/usr/bin/env python3
import glob
import os
for f in glob.glob('metadata/*/*.txt') + glob.glob('metadata/*/*/*.txt'):
if os.path.getsize(f) == 0:
os.remove(f)
continue
with open(f) as fp:
data = fp.read()
with open(f, 'w') as fp:
fp.write(data.rstrip())
fp.write('\n')