aboutsummaryrefslogtreecommitdiffstats
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
parentde3fb4a8aa5957a37bae11d3662638f79551f826 (diff)
Output tweaks
-rwxr-xr-xsrc/scripts/combine_relnotes.py13
-rwxr-xr-xsrc/scripts/install.py2
2 files changed, 9 insertions, 6 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())
diff --git a/src/scripts/install.py b/src/scripts/install.py
index a6f25e955..7e9a9e3b6 100755
--- a/src/scripts/install.py
+++ b/src/scripts/install.py
@@ -194,7 +194,7 @@ def main(args = None):
lic.write(license_text('doc/license.rst'))
with open(os.path.join(botan_doc_dir, 'news.txt'), 'w+') as news:
- news.write(combine_relnotes.combine_relnotes('doc/relnotes'))
+ news.write(combine_relnotes.combine_relnotes('doc/relnotes', False))
logging.info('Botan %s installation complete', build_vars['version'])