From: Shane Jaroch Date: Mon, 19 Jan 2026 18:43:25 +0000 (-0500) Subject: update gen homepage X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=8f1d8fc9acecf867a5e8011c22839da3240e297f;p=nutratech%2Fvps-root.git update gen homepage --- diff --git a/scripts/gen_services_map.py b/scripts/gen_services_map.py index de4ec7c..4a14be7 100755 --- a/scripts/gen_services_map.py +++ b/scripts/gen_services_map.py @@ -11,25 +11,25 @@ OUTPUT_HTML = REPO_ROOT / "scripts/gitweb-simplefrontend/services.html" HTML_TEMPLATE = """ - NutraTech Git Services + {title} -

Git Services Map

+

{title}

Generated automatically from Nginx configuration.

- {services_html} + {content} """ @@ -89,17 +89,26 @@ def get_all_services(): return services_git, services_other -def generate_html(services): - services_html = "" +def generate_html(title, groups): + """ + groups: list of tuples (header_name, services_list) + """ + content_html = "" - for s in services: - services_html += f""" -
-

{s['url']}

-
{s['description']}
-
""" + for header, services in groups: + if header: + content_html += f'

{header}

' + + for s in services: + # Use absolute URL if it starts with http, otherwise relative + url = s['url'] + content_html += f""" +
+

{url}

+
{s['description']}
+
""" - return HTML_TEMPLATE.format(services_html=services_html) + return HTML_TEMPLATE.format(title=title, content=content_html) def main(): @@ -108,18 +117,29 @@ def main(): # Output 1: Git Services Only print(f"Generating Git Services map with {len(services_git)} items...") - git_html = generate_html(services_git) + git_groups = [("", services_git)] + git_html = generate_html("Git Services", git_groups) + os.makedirs(OUTPUT_HTML.parent, exist_ok=True) with open(OUTPUT_HTML, "w") as f: f.write(git_html) print(f"Generated Git map at: {OUTPUT_HTML}") # Output 2: Homepage (All Services) - # Save to scripts/homepage.html to keep it separate from gitweb assets OUTPUT_HTML_HOME = REPO_ROOT / "scripts/homepage.html" - services_all = services_git + services_other - print(f"Generating Homepage map with {len(services_all)} items...") - home_html = generate_html(services_all) + + # Grouping logic + all_groups = [ + ("Core Services", services_other), + ("Git Services", services_git) + ] + + # Calculate total items + total_items = sum(len(g[1]) for g in all_groups) + print(f"Generating Homepage map with {total_items} items...") + + home_html = generate_html("All Services", all_groups) + with open(OUTPUT_HTML_HOME, "w") as f: f.write(home_html) print(f"Generated Homepage map at: {OUTPUT_HTML_HOME}") diff --git a/scripts/gitweb-simplefrontend/services.html b/scripts/gitweb-simplefrontend/services.html index 6dcfb2f..6bf640d 100644 --- a/scripts/gitweb-simplefrontend/services.html +++ b/scripts/gitweb-simplefrontend/services.html @@ -1,37 +1,37 @@ - NutraTech Git Services + Git Services -

Git Services Map

+

Git Services

Generated automatically from Nginx configuration.

-
-

/v1

-
Original Gitweb (Basic)
-
-
-

/v2

-
Styled Frontend (Theme, Static)
-
-
-

/v3

-
Gitea (Full Server with Backend, Main)
-
+
+

/v1

+
Original Gitweb (Basic)
+
+
+

/v2

+
Styled Frontend (Theme, Static)
+
+
+

/v3

+
Gitea (Full Server with Backend, Main)
+
\ No newline at end of file diff --git a/scripts/homepage.html b/scripts/homepage.html index b5e27c0..d035508 100644 --- a/scripts/homepage.html +++ b/scripts/homepage.html @@ -1,53 +1,53 @@ - NutraTech Git Services + All Services -

Git Services Map

+

All Services

Generated automatically from Nginx configuration.

- -
-

/v1

-
Original Gitweb (Basic)
-
-
-

/v2

-
Styled Frontend (Theme, Static)
-
-
-

/v3

-
Gitea (Full Server with Backend, Main)
-
-
-

https://api.dev.nutra.tk

-
API
-
-
-

https://store.nutra.tk

-
Store
-
-
-

https://store-admin-8b56411b.nutra.tk

-
Store Admin
-
-
-

https://chat.nutra.tk

-
Matrix Chat
-
+

Core Services

+
+

https://api.dev.nutra.tk

+
API
+
+
+

https://store.nutra.tk

+
Store
+
+
+

https://store-admin-8b56411b.nutra.tk

+
Store Admin
+
+
+

https://chat.nutra.tk

+
Matrix Chat
+

Git Services

+
+

/v1

+
Original Gitweb (Basic)
+
+
+

/v2

+
Styled Frontend (Theme, Static)
+
+
+

/v3

+
Gitea (Full Server with Backend, Main)
+
\ No newline at end of file