1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-05-27 22:01:05 +03:00
matrix-js-sdk/scripts/changelog_head.py
David Baker 67e75fb7af Invoke changelog_head from outside the pushd
so we know the relative path is right
2016-12-09 19:19:40 +00:00

19 lines
395 B
Python
Executable File

#!/usr/bin/env python
"""
Outputs the body of the first entry of changelog file on stdin
"""
import re
import sys
found_first_header = False
for line in sys.stdin:
line = line.strip()
if re.match(r"^Changes in \[.*\]", line):
if found_first_header:
break
found_first_header = True
elif not re.match(r"^=+$", line) and len(line) > 0:
print line