fdroiddata/tools/check-metadata-summary-whitespace.py
Hans-Christoph Steiner ebb6baa3bd
standardize whitespace on localizable changelogs
This makes things work better when syncing with Weblate
2019-03-01 14:13:47 +01:00

18 lines
384 B
Python
Executable file

#!/usr/bin/env python3
import glob
import os
os.chdir(os.path.dirname(__file__) + '/../')
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.strip().rstrip())
fp.write('\n')