1{# 2Copyright 2021 The Pigweed Authors 3 4Licensed under the Apache License, Version 2.0 (the "License"); you may not 5use this file except in compliance with the License. You may obtain a copy of 6the License at 7 8 https://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13License for the specific language governing permissions and limitations under 14the License. 15#} 16{% set total_width = [max_description_width + max_key_list_width + 5, max_additional_help_text_width]|max %} 17{% set key_whitespace_indentation = ' ' * (max_description_width + 5) %} 18{% if preamble %} 19{{ preamble }} 20 21{% endif %} 22{% if additional_help_text %} 23{{ ' Help '.format(section).center(total_width, '=') }} 24 25{{ additional_help_text.rstrip() }} 26 27 28{# Two empty lines between sections #} 29{% endif %} 30{% for section, key_dict in sections.items() %} 31{{ ' {} Keys '.format(section).center(total_width, '=') }} 32 33{% for description, key_list in key_dict.items() %} 34{{ (description+' ').ljust(max_description_width + 3, '-') }} {{ key_list|sort|join('\n' + key_whitespace_indentation) }} 35{% endfor %} 36 37 38{# Two empty lines between sections #} 39{% endfor %} 40