diff --git a/scripts/changelog_head.py b/scripts/changelog_head.py new file mode 100755 index 000000000..0c2a6bb17 --- /dev/null +++ b/scripts/changelog_head.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +""" +Outputs the body of the first entry of changelog file CHANGELOG.md +""" + +import re + +found_first_header = False +for line in open("CHANGELOG.md"): + 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