This commit is contained in:
quenousimporte 2025-06-02 09:34:30 +02:00
parent c2ad0333e9
commit 2fe3d14c27
1 changed files with 4 additions and 4 deletions

View File

@ -47,6 +47,10 @@ os.makedirs("out/gmi", exist_ok=True)
for folderinfo in index['folders']: for folderinfo in index['folders']:
if not os.path.exists(folderinfo['folder']):
print(f"Folder {folderinfo['folder']} does not exist, skipping.")
continue
sectiontitle = folderinfo['title'] sectiontitle = folderinfo['title']
htmlhome += "\n<h2>{}</h2>\n<ul>".format(sectiontitle) htmlhome += "\n<h2>{}</h2>\n<ul>".format(sectiontitle)
@ -54,10 +58,6 @@ for folderinfo in index['folders']:
for fileinfo in folderinfo['files']: for fileinfo in folderinfo['files']:
if not os.path.exists(folderinfo['folder']):
print(f"Folder {folderinfo['folder']} does not exist, skipping.")
continue
filetitle = fileinfo['title'] filetitle = fileinfo['title']
filename = fileinfo['file'] filename = fileinfo['file']
fileroot, fileextension = os.path.splitext(filename) fileroot, fileextension = os.path.splitext(filename)