Group by vehicle type and add headings

This commit is contained in:
Hamish Willee
2017-07-01 20:04:46 +02:00
committed by Lorenz Meier
parent d88e387013
commit 50140b3d90
2 changed files with 76 additions and 1 deletions
+8 -1
View File
@@ -13,10 +13,17 @@ class MarkdownTablesOutput():
result += """This page lists all supported airframes and types including
the motor assignment and numbering. The motors in **green** rotate clockwise,
the ones in **blue** counterclockwise.\n\n"""
type_set = set()
for group in groups:
if group.GetType() not in type_set:
#result += '\n<span id="type_%s"></span>\n' % group.GetType().lower()
result += '## %s\n\n' % group.GetType()
type_set.add(group.type)
result += '## %s\n\n' % group.GetName()
result += '### %s\n\n' % group.GetName()
# Display an image of the frame
image_name = group.GetImageName()