Gitlab migration complete. If you have any issue please read the FAQ.

Verified Commit 131d6bf1 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

sort entries in the index

parent 5898e4da
......@@ -57,8 +57,12 @@ dirs = sorted(dirs)
index = ""
for d in dirs:
# set the header of the section
index += "### " + d.capitalize() + "\n"
localIndexArr = []
# walk through the folders with all the cards
for root, dirs, files in os.walk(folder+"/"+d):
for file in files:
if file.endswith(".md"):
......@@ -110,11 +114,16 @@ for d in dirs:
title = title.rstrip("\n\r")
title = title[2:]
index += " * [" + title + "](./" + root + "/" + "\n"
#index += " * [" + title + "](./" + root + "/" + "\n"
localIndexArr.append(" * [" + title + "](./" + root + "/" + "\n")
# output
print(" + New header added.")
print("-----------------------")
# join all subcategories to the index
localIndexArr.sort()
index += ''.join(localIndexArr)
# output the index
print(index)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment