weblate/scripts/extract-release-notes
Michal Čihař 34e6c7c4b6 Misc: Remove encoding pragma
It is not needed in Python 3.
2020-03-12 09:44:36 +01: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="")