Skip to content
Snippets Groups Projects
Verified Commit 2e6b5fe1 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

remove debugging elements

parent dece49eb
No related branches found
No related tags found
No related merge requests found
...@@ -217,12 +217,9 @@ for folder in cardDirs: ...@@ -217,12 +217,9 @@ for folder in cardDirs:
# define the header for each card # define the header for each card
header = "---\n" header = "---\n"
#print("orderArr --- ")
#print(orderArr)
if len(order) > 0: if len(order) > 0:
header += "order: " + str(order) + "\n" header += "order: " + str(order) + "\n"
# append the order of the card # append the order of the card
# find the maximum of existing orders # find the maximum of existing orders
if folderFlag: if folderFlag:
...@@ -235,24 +232,10 @@ for folder in cardDirs: ...@@ -235,24 +232,10 @@ for folder in cardDirs:
tmp = orderArr[indexS].copy() tmp = orderArr[indexS].copy()
tmp.append(maxOrder + int(order)) tmp.append(maxOrder + int(order))
#print("tmp --- ")
#print(tmp)
#print("")
#print("indexS")
#print(indexS)
#print("orderArr --- ")
#print(orderArr)
#print("orderArr[indexS] --- ")
#print(orderArr[indexS])
orderArr[indexS] = tmp orderArr[indexS] = tmp
#print("orderArr --- ")
#print(orderArr)
else: else:
orderArr[indexS] = [] orderArr[indexS] = []
header += "layout: page\n" header += "layout: page\n"
header += "permalink: " + permalink + "\n" header += "permalink: " + permalink + "\n"
header += "shortcut: " + root_handbook(shortcut) + "\n" header += "shortcut: " + root_handbook(shortcut) + "\n"
...@@ -308,32 +291,11 @@ for folder in cardDirs: ...@@ -308,32 +291,11 @@ for folder in cardDirs:
# output # output
print(" + New header added.") print(" + New header added.")
print("-----------------------") print("-----------------------")
#print("")
#debugging
#print("--- debugging ---")
#print(indexS)
#print("---")
#print(localIndexArr[indexS])
#print("---")
#print(orderArr)
#print("")
# ordering of cards # ordering of cards
#print("-- sorting --")
for d in sections: for d in sections:
#print("section: " + d)
indexS = sections.index(d) indexS = sections.index(d)
#print(indexS)
#print("")
#print("-- order --")
#print(orderArr[indexS])
#print("-- before ordering --")
#print(localIndexArr[indexS])
#print("")
#print(len(orderArr[indexS]))
#print(len(localIndexArr[indexS]))
# join all subcategories to the index # join all subcategories to the index
# if all subcategories have a predefined order # if all subcategories have a predefined order
...@@ -341,22 +303,12 @@ for d in sections: ...@@ -341,22 +303,12 @@ for d in sections:
print("") print("")
X = localIndexArr[indexS][1:] X = localIndexArr[indexS][1:]
Y = orderArr[indexS] Y = orderArr[indexS]
#print("-- X --")
#print(X)
#print("-- Y --")
#print(Y)
localIndexArr[indexS] = [x for _, x in sorted(zip(Y, X))] localIndexArr[indexS] = [x for _, x in sorted(zip(Y, X))]
# natural sorting otherwise # natural sorting otherwise
else: else:
localIndexArr[indexS] = natsorted(localIndexArr[indexS]) localIndexArr[indexS] = natsorted(localIndexArr[indexS])
#print("-- after ordering --")
#print(localIndexArr[indexS])
#print("")
print(localIndexArr) print(localIndexArr)
#print(sections)
# determine the index # determine the index
k = 0 k = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment