aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/combine_relnotes.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-02 23:39:06 +0000
committerlloyd <[email protected]>2015-01-02 23:39:06 +0000
commit8440dafa9db6ab3a1ba1de17a11499ab843fb733 (patch)
treee49d75ad01fa7d3262629208a9f00a41b7525ca8 /src/scripts/combine_relnotes.py
parentde3fb4a8aa5957a37bae11d3662638f79551f826 (diff)
Output tweaks
Diffstat (limited to 'src/scripts/combine_relnotes.py')
-rwxr-xr-xsrc/scripts/combine_relnotes.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/scripts/combine_relnotes.py b/src/scripts/combine_relnotes.py
index 295e88ab0..c843bf347 100755
--- a/src/scripts/combine_relnotes.py
+++ b/src/scripts/combine_relnotes.py
@@ -10,7 +10,7 @@ import re
import sys
import os
-def combine_relnotes(relnote_dir):
+def combine_relnotes(relnote_dir, with_rst_labels):
relnotes = [p for p in os.listdir(relnote_dir) if p.startswith(('0', '1', '2'))]
@@ -43,7 +43,10 @@ def combine_relnotes(relnote_dir):
version_contents[version] = (''.join(contents)).strip()
def make_label(v):
- return ".. _v%s:\n" % (v.replace('.', '_'))
+ if with_rst_labels:
+ return ".. _v%s:\n\n" % (v.replace('.', '_'))
+ else:
+ return ''
s = ''
@@ -57,13 +60,13 @@ def combine_relnotes(relnote_dir):
if len(versions_nyr) > 0:
for v in versions_nyr:
- s += make_label(v) + "\n"
+ s += make_label(v)
s += version_contents[v]
s += "\n\n"
for d in sorted(date_to_version.keys(), reverse=True):
for v in sorted(date_to_version[d]):
- s += make_label(v) + "\n"
+ s += make_label(v)
s += version_contents[v]
s += "\n\n"
@@ -73,7 +76,7 @@ def main(args = None):
if args is None:
args = sys.argv
- print combine_relnotes(args[1])
+ print combine_relnotes(args[1], True)
if __name__ == '__main__':
sys.exit(main())