weblate/scripts/extract-release-notes
2021-04-09 15:25:29 +02:00

20 lines
470 B
Python
Executable file

#!/usr/bin/env python3
import sys
if len(sys.argv) != 2:
raise Exception("Missing argument")
start = f"Weblate {sys.argv[1]}\n"
display = False
with open("docs/changes.rst") 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="")