From 6f61874da3243f69a3aaeb0383c60b696379138e Mon Sep 17 00:00:00 2001
From: laurentheirendt <laurent.heirendt@uni.lu>
Date: Tue, 20 Sep 2022 11:19:09 +0200
Subject: [PATCH] simplify

---
 .ci/generateIndex.py | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/.ci/generateIndex.py b/.ci/generateIndex.py
index a833641f..775e8ee5 100644
--- a/.ci/generateIndex.py
+++ b/.ci/generateIndex.py
@@ -12,21 +12,8 @@ localIndexArr, orderArr = get_indexArr(sections)
 
 index = generate_index_top()
 
-whiteList = ''
-
-for folder in cardDirs:
-    # FolderFlag gets set to true at the first iteration
-    folderFlag = True
-
-    # check if folder exists
-    if path.isdir(folder) and folder not in ignore:
-        dirs = os.listdir(folder)
-        dirs = natsorted(dirs)
-
-        for d in dirs:
-            if d[0] != "." and d not in ignore and has_subdirs(folder + "/" + d):
-                # walk through the folders with all the cards
-                folderFlag, localIndexArr, whiteList = core(localroot, folder, localIndexArr, orderArr, whiteList, folderFlag, d, sections)
+# walk through the folders with all the cards
+folderFlag, localIndexArr, whiteList = core(cardDirs, localroot, localIndexArr, orderArr, sections, ignore)
 
 localIndexArr = sort_sections(sections, localIndexArr, orderArr)
 index = generate_index(index, sections, localIndexArr)
-- 
GitLab