From 7ae9480d944537fcf0a0bcf8f396debe3bcce83f Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Wed, 7 May 2025 14:38:00 -0700 Subject: [PATCH] build-release-notes: more blank lines in output This makes it easier to read and copy/paste the contents when preparing a Lix release blog post. The output can be read in `build/doc/manual/src/release-notes/rl-next-generated.md`. Before: ## Breaking changes - Release note 1 Many thanks to ... - Release note 2 Many thanks to ... ## Fixes - Release note 3 Many thanks to ... After: ## Breaking changes - Release note 1 Many thanks to ... - Release note 2 Many thanks to ... ## Fixes - Release note 3 Many thanks to ... Change-Id: Ifea5af1bdce7b2315f3b46c17ebb945e99cfb36f --- maintainers/build-release-notes.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/maintainers/build-release-notes.py b/maintainers/build-release-notes.py index 2813e4744..79274c2db 100644 --- a/maintainers/build-release-notes.py +++ b/maintainers/build-release-notes.py @@ -115,13 +115,20 @@ def do_category(author_info: AuthorInfoDB, entries: list[Tuple[pathlib.Path, Any links += [format_cl(int(cl)) for cl in listify(entry.metadata.get('cls', []))] if links != []: header += " " + " ".join(links) + if header: print(f"- {header}") print() + else: + print("- ", end='') + print(textwrap.indent(entry.content, ' ')) if credits := listify(entry.metadata.get('credits', [])): print() print(textwrap.indent('Many thanks to {} for this.'.format(plural_list(list(author_info[c] for c in credits))), ' ')) + + # Blank line after each entry. + print() except Exception as e: e.add_note(f"in {p}") raise @@ -151,8 +158,14 @@ def run_on_dir(author_info: AuthorInfoDB, d): for category in CATEGORIES: if entries[category]: - print('\n##', category) + print('##', category) + # Blank line after each heading. + print() do_category(author_info, entries[category]) + # Blank line after each category. + # This turns into two blank lines when combined with the blank line + # after each entry. + print() def main(): import argparse