fixing stale runs
All checks were successful
Build Org Website / build (push) Successful in 47s

This commit is contained in:
2026-05-09 18:33:35 +01:00
parent eea34a1c68
commit 2b5a23b566
330 changed files with 99 additions and 76 deletions

8
search-index-json.py Normal file → Executable file
View File

@@ -2,6 +2,8 @@ import os
import json
from bs4 import BeautifulSoup
OUTPUT_DIR = os.path.normpath(os.environ.get("SITE_OUTPUT_DIR", "output"))
def strip_html_tags(html):
soup = BeautifulSoup(html, "html.parser")
for tag in soup(["script", "style"]):
@@ -25,7 +27,7 @@ def create_folder_structure_json(path):
for entry in os.listdir(path):
entry_path = os.path.join(path, entry)
base_url = entry_path[6:]
base_url = os.path.relpath(entry_path, OUTPUT_DIR)
if os.path.isdir(entry_path):
result['children'].append(
create_folder_structure_json(entry_path)
@@ -52,10 +54,10 @@ def create_folder_structure_json(path):
return result
folder_path = 'output/'
folder_path = OUTPUT_DIR
folder_json = create_folder_structure_json(folder_path)
output_file = 'output/test.json'
output_file = os.path.join(OUTPUT_DIR, 'test.json')
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(folder_json, f, indent=4, ensure_ascii=False)