update
authorShane Jaroch <chown_tee@proton.me>
Wed, 21 Jan 2026 01:54:56 +0000 (20:54 -0500)
committerShane Jaroch <chown_tee@proton.me>
Wed, 21 Jan 2026 01:54:56 +0000 (20:54 -0500)
scripts/gen_services_map.py
scripts/gitweb-simplefrontend/services.html
scripts/homepage.html
scripts/klaus_app.py
scripts/manage_repos.py

index 5b4270f013ab1635644c78a9e65cc6ed9e9b8346..a70e823472f52b9e5e2f47f9429a90cf9396ed4f 100755 (executable)
@@ -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'<h2 class="group-header">{header}</h2>'
-        
+
         for s in services:
             # Use absolute URL if it starts with http, otherwise relative
-            url = s['url']
+            url = s["url"]
             content_html += f"""
         <div class="service">
             <h3><a href="{url}">{url}</a></h3>
@@ -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()
-
index 6bf640d5d883baae860aa44c3c9254115f8189af..44b7d40e135987c5fb099349f2b5d4e760451100 100644 (file)
 
     
         <div class="service">
-            <h3><a href="/v1">/v1</a></h3>
+            <h3><a href="https://git.nutra.tk/v1">https://git.nutra.tk/v1</a></h3>
             <div class="desc">Original Gitweb (Basic)</div>
         </div>
         <div class="service">
-            <h3><a href="/v2">/v2</a></h3>
+            <h3><a href="https://git.nutra.tk/v2">https://git.nutra.tk/v2</a></h3>
             <div class="desc">Styled Frontend (Theme, Static)</div>
         </div>
         <div class="service">
-            <h3><a href="/v3">/v3</a></h3>
+            <h3><a href="https://git.nutra.tk/v3">https://git.nutra.tk/v3</a></h3>
             <div class="desc">Gitea (Full Server with Backend, Main)</div>
         </div>
 
index d0355085e29a4ad9ee7d27c8878b967bddab52d5..bdf09dc1af355f7f7027f235de268270c2434c5d 100644 (file)
     <h1>All Services</h1>
     <p class="meta">Generated automatically from Nginx configuration.</p>
 
-    <h2 class="group-header">Core Services</h2>
+    <h2 class="group-header">Core Services</h2><h2 class="group-header">Git Services</h2>
         <div class="service">
-            <h3><a href="https://api.dev.nutra.tk">https://api.dev.nutra.tk</a></h3>
-            <div class="desc">API</div>
-        </div>
-        <div class="service">
-            <h3><a href="https://store.nutra.tk">https://store.nutra.tk</a></h3>
-            <div class="desc">Store</div>
-        </div>
-        <div class="service">
-            <h3><a href="https://store-admin-8b56411b.nutra.tk">https://store-admin-8b56411b.nutra.tk</a></h3>
-            <div class="desc">Store Admin</div>
-        </div>
-        <div class="service">
-            <h3><a href="https://chat.nutra.tk">https://chat.nutra.tk</a></h3>
-            <div class="desc">Matrix Chat</div>
-        </div><h2 class="group-header">Git Services</h2>
-        <div class="service">
-            <h3><a href="/v1">/v1</a></h3>
+            <h3><a href="https://git.nutra.tk/v1">https://git.nutra.tk/v1</a></h3>
             <div class="desc">Original Gitweb (Basic)</div>
         </div>
         <div class="service">
-            <h3><a href="/v2">/v2</a></h3>
+            <h3><a href="https://git.nutra.tk/v2">https://git.nutra.tk/v2</a></h3>
             <div class="desc">Styled Frontend (Theme, Static)</div>
         </div>
         <div class="service">
-            <h3><a href="/v3">/v3</a></h3>
+            <h3><a href="https://git.nutra.tk/v3">https://git.nutra.tk/v3</a></h3>
             <div class="desc">Gitea (Full Server with Backend, Main)</div>
         </div>
 
index ace43fcc90713475cdce672e9f1705677a41c011..586f33932d91b5c0910162512cb5dba9ed30a37d 100644 (file)
@@ -1,4 +1,5 @@
 import os
+
 import klaus
 from klaus.contrib.wsgi import make_app
 
index b7f9a6c6da1baa921e24d52f1239dba44271fcbb..56471d64fe9b7adda1a8874b517e9b54f8b32fc9 100755 (executable)
@@ -2,9 +2,9 @@
 import argparse
 import json
 import os
+import shlex
 import subprocess
 import sys
-import shlex
 
 try:
     import argcomplete