diff --git a/fix_bugs.py b/fix_bugs.py deleted file mode 100644 index 6c7a42d..0000000 --- a/fix_bugs.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import re - -# 1. Fix catalog.html JS bug and error box colors -catalog_path = r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\catalog.html" -with open(catalog_path, "r", encoding="utf-8") as f: - catalog_html = f.read() - -# Remove totalCount reference since we removed the element -catalog_html = catalog_html.replace("document.getElementById('totalCount').textContent = Total: ;", "") - -# Fix the error box colors to be dark-theme compatible -catalog_html = catalog_html.replace("border-red-200 bg-red-50 text-red-600", "border-red-900 bg-red-950/30 text-red-400") -with open(catalog_path, "w", encoding="utf-8") as f: - f.write(catalog_html) - -# 2. Fix input field visibility in scaffold.html and playground.html -files = [ - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\admin\scaffold.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\playground.html" -] - -for fp in files: - if not os.path.exists(fp): - continue - with open(fp, "r", encoding="utf-8") as f: - content = f.read() - - # Enhance input-base visibility - content = content.replace("border: 1px solid rgba(255,255,255,0.1);", "border: 1px solid rgba(255,255,255,0.25);\n background-color: rgba(255,255,255,0.05);") - content = content.replace("background-color: #18181b;", "") # remove old background - - # In playground.html, also enhance select Tool and textarea - # We already updated .input-base, which applies to textarea and select. - - with open(fp, "w", encoding="utf-8") as f: - f.write(content) - -print("Bugs and visibility fixed.") diff --git a/fix_imports.py b/fix_imports.py deleted file mode 100644 index 899d23f..0000000 --- a/fix_imports.py +++ /dev/null @@ -1,106 +0,0 @@ -import os -import re - -root_dir = "." -target_ext = ".java" - -# Regex to find fully qualified class names -fqcn_pattern = re.compile(r'\b(((?:java\.util|java\.time|java\.io|java\.math|java\.net)\.[a-z0-9.]*?([A-Z]\w+))|(org\.springframework\.[a-z0-9.]*?([A-Z]\w+))|(io\.shinhanlife\.[a-z0-9.]*?([A-Z]\w+)))\b') - -count = 0 - -for subdir, dirs, files in os.walk(root_dir): - if '.git' in dirs: dirs.remove('.git') - if 'build' in dirs: dirs.remove('build') - if '.gradle' in dirs: dirs.remove('.gradle') - - for file in files: - if file.endswith(target_ext): - filepath = os.path.join(subdir, file) - try: - with open(filepath, 'r', encoding='utf-8') as f: - content = f.read() - - lines = content.split('\n') - new_imports = set() - new_lines = [] - modified = False - - in_block_comment = False - - for line in lines: - stripped = line.strip() - - if stripped.startswith('/*'): - in_block_comment = True - - is_comment = in_block_comment or stripped.startswith('//') or stripped.startswith('*') - - if stripped.endswith('*/'): - in_block_comment = False - - if stripped.startswith('import ') or stripped.startswith('package '): - new_lines.append(line) - continue - - if is_comment: - new_lines.append(line) - continue - - def repl(match): - fqcn = match.group(1) - # Extract the simple class name - class_name = match.group(3) or match.group(5) or match.group(7) - - if class_name: - new_imports.add(f"import {fqcn};") - return class_name - return fqcn - - new_line = fqcn_pattern.sub(repl, line) - if new_line != line: - modified = True - new_lines.append(new_line) - - if modified: - existing_imports = set() - insert_idx = 0 - package_line = "" - - for i, line in enumerate(lines): - stripped = line.strip() - if stripped.startswith('package '): - package_line = line - elif stripped.startswith('import '): - existing_imports.add(stripped) - elif stripped == '' or stripped.startswith('//') or stripped.startswith('/*') or stripped.startswith('*'): - continue - elif package_line and not stripped.startswith('import '): - insert_idx = i - break - - all_imports = existing_imports.union(new_imports) - sorted_imports = sorted(list(all_imports)) - - res_lines = [] - if package_line: - res_lines.append(package_line) - res_lines.append('') - - for imp in sorted_imports: - res_lines.append(imp) - - res_lines.append('') - - res_lines.extend(new_lines[insert_idx:]) - - new_content = '\n'.join(res_lines) - - with open(filepath, 'w', encoding='utf-8') as f: - f.write(new_content) - print(f"Fixed imports in: {filepath}") - count += 1 - except Exception as e: - print(f"Error processing {filepath}: {e}") - -print(f"\nTotal files fixed: {count}") diff --git a/fix_links.py b/fix_links.py deleted file mode 100644 index 3059f23..0000000 --- a/fix_links.py +++ /dev/null @@ -1,23 +0,0 @@ -import os - -files_to_patch = [ - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\admin\scaffold.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\catalog.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\playground.html" -] - -for file_path in files_to_patch: - if not os.path.exists(file_path): - continue - with open(file_path, "r", encoding="utf-8") as f: - content = f.read() - - # Fix the links - content = content.replace('href="/admin/catalog.html"', 'href="/catalog.html"') - content = content.replace('href="/admin/playground.html"', 'href="/playground.html"') - content = content.replace('href="/admin/scaffold.html"', 'href="/admin/scaffold.html"') # Keep scaffold as /admin/scaffold.html - - with open(file_path, "w", encoding="utf-8") as f: - f.write(content) - -print("Links fixed.") diff --git a/patch_colors.py b/patch_colors.py deleted file mode 100644 index 9e4de04..0000000 --- a/patch_colors.py +++ /dev/null @@ -1,37 +0,0 @@ -import os -import re - -files_to_patch = [ - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\admin\scaffold.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\catalog.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\playground.html" -] - -for file_path in files_to_patch: - if not os.path.exists(file_path): - continue - with open(file_path, "r", encoding="utf-8") as f: - content = f.read() - - # Change background and foreground colors in tailwind config - content = content.replace("background: '#ffffff',", "background: '#f8fafc',") - content = content.replace("foreground: '#000000',", "foreground: '#0f172a',") - - # Add primary colors to tailwind config - if "primaryHover: '#4338ca'," not in content: - content = content.replace("border: '#e2e8f0',", "border: '#e2e8f0',\n primary: '#4f46e5',\n primaryHover: '#4338ca',") - - # Change btn-black to use primary color (indigo) instead of pure black for primary actions - # In scaffold.html, btn-black is used for the generate button. Let's make it btn-primary. - content = content.replace(".btn-black {", ".btn-black {\n background-color: theme('colors.primary');") - content = content.replace("background-color: #000000;", "") - content = content.replace(".btn-black:hover {\n background-color: #333333;\n }", ".btn-black:hover {\n background-color: theme('colors.primaryHover');\n }") - - # Change btn-black references to btn-primary - content = content.replace("btn-black", "btn-primary") - content = content.replace(".btn-primary {", ".btn-primary {\n color: #ffffff;\n font-weight: 500;\n padding: 0.5rem 1rem;\n border-radius: 4px;\n font-size: 0.875rem;\n transition: background-color 0.15s;\n }") - - with open(file_path, "w", encoding="utf-8") as f: - f.write(content) - -print("Patch applied.") diff --git a/patch_dark_theme.py b/patch_dark_theme.py deleted file mode 100644 index c991df0..0000000 --- a/patch_dark_theme.py +++ /dev/null @@ -1,178 +0,0 @@ -import os -import re - -files = [ - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\admin\scaffold.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\catalog.html", - r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static\playground.html" -] - -tailwind_and_style = """ - """ - -for fp in files: - if not os.path.exists(fp): - continue - with open(fp, "r", encoding="utf-8") as f: - content = f.read() - - # 1. Replace tailwind config and style - content = re.sub(r'