From c5dd21c8c664a28b96791534bc41eb5cc6b992f9 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 13 May 2022 17:14:41 +0200
Subject: [PATCH] DOC: update doc script

---
 doc/gen_ref_pages.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/gen_ref_pages.py b/doc/gen_ref_pages.py
index e731f3d..fed31c0 100755
--- a/doc/gen_ref_pages.py
+++ b/doc/gen_ref_pages.py
@@ -8,7 +8,11 @@ nav = mkdocs_gen_files.Nav()
 
 processed_paths = ["apps", "scenes"]
 
-for path in sorted(Path(".").rglob("*.py")):
+paths = []
+for processed_path in processed_paths:
+    paths += Path(processed_path).rglob("*.py")
+    
+for path in paths:
     module_path = path.relative_to(".").with_suffix("")
     doc_path = path.relative_to(".").with_suffix(".md")
     full_doc_path = Path("reference", doc_path)
@@ -19,9 +23,6 @@ for path in sorted(Path(".").rglob("*.py")):
 
     parts = tuple(module_path.parts)
     print(f"parts: {parts}")
-    if parts[0] not in processed_paths:
-        print("--> Ignored")
-        continue
 
     if  parts[-1] == "__init__":
         if len(parts) <= 1:
-- 
GitLab