weblate/scripts/extract-release-notes
Michal Čihař 9e8b29a687 Release: break after print notes
Signed-off-by: Michal Čihař <michal@cihar.com>
2019-07-09 11:02:30 +02:00

20 lines
483 B
Python
Executable file

#!/usr/bin/env python3
import sys
if len(sys.argv) != 2:
raise Exception('Missing argument')
start = 'weblate {}\n'.format(sys.argv[1])
display = False
with open('docs/changes.rst', 'r') as handle:
for line in handle:
if display:
if line.startswith('weblate '):
break
elif not line.startswith('--'):
print(line, end='')
elif line == start:
display = True
print(line, end='')