weblate/scripts/extract-release-notes
Michal Čihař b1d0c0715d chore: Consolidate copyright headers
SPDX-FileCopyrightText was mistakenly used on some files.
2023-01-11 09:25:24 +01:00

24 lines
568 B
Python
Executable file

#!/usr/bin/env python3
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
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="")