From: Shane Jaroch Date: Wed, 21 Jan 2026 01:54:56 +0000 (-0500) Subject: update X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=d7834efc5dd6c22f3c055133731e63a3f722e93e;p=nutratech%2Fvps-root.git update --- diff --git a/scripts/gen_services_map.py b/scripts/gen_services_map.py index 5b4270f..a70e823 100755 --- a/scripts/gen_services_map.py +++ b/scripts/gen_services_map.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import re import os +import re from pathlib import Path # Paths relative to repo root @@ -64,8 +64,9 @@ def parse_file(path, pattern, is_version=False): return items -import sys import argparse +import sys + def get_all_services(custom_config_path=None): # Regex to find "Version X: Description" lines @@ -102,7 +103,6 @@ def get_all_services(custom_config_path=None): return services_git, services_other - def generate_html(title, groups): """ groups: list of tuples (header_name, services_list) @@ -112,10 +112,10 @@ def generate_html(title, groups): 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'] + url = s["url"] content_html += f"""

{url}

@@ -125,10 +125,13 @@ def generate_html(title, groups): return HTML_TEMPLATE.format(title=title, content=content_html) - def main(): - parser = argparse.ArgumentParser(description="Generate HTML services map from Nginx config") - parser.add_argument("config_path", nargs="?", help="Path to the Nginx configuration file") + parser = argparse.ArgumentParser( + description="Generate HTML services map from Nginx config" + ) + parser.add_argument( + "config_path", nargs="?", help="Path to the Nginx configuration file" + ) args = parser.parse_args() print(f"Reading configs...") @@ -143,7 +146,7 @@ def main(): print(f"Generating Git Services map with {len(services_git)} items...") 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) @@ -151,19 +154,16 @@ def main(): # Output 2: Homepage (All Services) OUTPUT_HTML_HOME = REPO_ROOT / "scripts/homepage.html" - + # Grouping logic - all_groups = [ - ("Core Services", services_other), - ("Git Services", services_git) - ] - + 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}") @@ -171,4 +171,3 @@ def main(): if __name__ == "__main__": main() - diff --git a/scripts/gitweb-simplefrontend/services.html b/scripts/gitweb-simplefrontend/services.html index 6bf640d..44b7d40 100644 --- a/scripts/gitweb-simplefrontend/services.html +++ b/scripts/gitweb-simplefrontend/services.html @@ -21,15 +21,15 @@
-

/v1

+

https://git.nutra.tk/v1

Original Gitweb (Basic)
-

/v2

+

https://git.nutra.tk/v2

Styled Frontend (Theme, Static)
-

/v3

+

https://git.nutra.tk/v3

Gitea (Full Server with Backend, Main)
diff --git a/scripts/homepage.html b/scripts/homepage.html index d035508..bdf09dc 100644 --- a/scripts/homepage.html +++ b/scripts/homepage.html @@ -19,33 +19,17 @@

All Services

Generated automatically from Nginx configuration.

-

Core Services

+

Core Services

Git Services

- - -
-

https://chat.nutra.tk

-
Matrix Chat
-

Git Services

-
-

/v1

+

https://git.nutra.tk/v1

Original Gitweb (Basic)
-

/v2

+

https://git.nutra.tk/v2

Styled Frontend (Theme, Static)
-

/v3

+

https://git.nutra.tk/v3

Gitea (Full Server with Backend, Main)
diff --git a/scripts/klaus_app.py b/scripts/klaus_app.py index ace43fc..586f339 100644 --- a/scripts/klaus_app.py +++ b/scripts/klaus_app.py @@ -1,4 +1,5 @@ import os + import klaus from klaus.contrib.wsgi import make_app diff --git a/scripts/manage_repos.py b/scripts/manage_repos.py index b7f9a6c..56471d6 100755 --- a/scripts/manage_repos.py +++ b/scripts/manage_repos.py @@ -2,9 +2,9 @@ import argparse import json import os +import shlex import subprocess import sys -import shlex try: import argcomplete