@@ -0,0 +1,1579 @@
+#!/usr/bin/python%0A%0Aimport re%0Aimport sys%0A%0Adef main(args = None):%0A    if args is None:%0A        args = sys.argv%0A%0A    re_version = re.compile('Version (%5Cd+%5C.%5Cd+%5C.%5Cd+), (%5B0-9%5D%7B4%7D-%5B0-9%5D%7B2%7D-%5B0-9%5D%7B2%7D)$')%0A    re_nyr = re.compile('Version (%5Cd+%5C.%5Cd+%5C.%5Cd+), Not Yet Released$')%0A%0A    version_contents = %7B%7D%0A    version_date = %7B%7D%0A    versions = %5B%5D%0A    versions_nyr = %5B%5D%0A%0A    for f in args%5B1:%5D:%0A        contents = open(f).readlines()%0A%0A        match = re_version.match(contents%5B0%5D)%0A%0A        if match:%0A            version = match.group(1)%0A            date = match.group(2)%0A            versions.append(version)%0A            version_date%5Bversion%5D = date%0A        else:%0A            match = re_nyr.match(contents%5B0%5D)%0A            version = match.group(1)%0A%0A            versions_nyr.append(version)%0A            if not match:%0A                raise Exception('No version match for %25s' %25 (f))%0A%0A        version_contents%5Bversion%5D = (''.join(contents)).strip()%0A%0A    def make_label(v):%0A        return %22.. _v%25s:%5Cn%22 %25 (v.replace('.', '_'))%0A%0A    print %22Release Notes%22%0A    print %22========================================%22%0A    print%0A%0A    date_to_version = %7B%7D%0A    for (v,d) in version_date.items():%0A        date_to_version.setdefault(d, %5B%5D).append(v)%0A%0A    if len(versions_nyr) %3E 0:%0A        for v in versions_nyr:%0A            print make_label(v)%0A            print version_contents%5Bv%5D, %22%5Cn%22%0A%0A    for d in sorted(date_to_version.keys(), reverse=True):%0A        for v in sorted(date_to_version%5Bd%5D):%0A            print make_label(v)%0A            print version_contents%5Bv%5D, %22%5Cn%22%0A%0Aif __name__ == '__main__':%0A    sys.exit(main())%0A

Add a script for combining version .rst files