Spaces:
Sleeping
Sleeping
Download check_frontend.py from vinith17/CodeBug: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/spaces/vinith17/CodeBug/resolve/aea15554cd38bc2a55b8ea3d3cce8ce7ef9689d9/check_frontend.py
- Command line
-
hf download hf://spaces/vinith17/CodeBug@aea15554cd38bc2a55b8ea3d3cce8ce7ef9689d9/check_frontend.py
-
curl -L -o check_frontend.py https://huggingface.co/spaces/vinith17/CodeBug/resolve/aea15554cd38bc2a55b8ea3d3cce8ce7ef9689d9/check_frontend.py
1.59 kB
| #!/usr/bin/env python3 | |
| """Test frontend HTML rendering and features""" | |
| import os | |
| html_file = "c:\\Users\\vinit\\Projects\\CodeBug\\templates\\index.html" | |
| print("=" * 70) | |
| print("FRONTEND FEATURE CHECK") | |
| print("=" * 70) | |
| with open(html_file, 'r', encoding='utf-8') as f: | |
| content = f.read().lower() | |
| # Check for key features | |
| features = { | |
| "Confidence Meter Display": "confidence-meter", | |
| "Confidence Bar CSS": "confidence-bar", | |
| "Export Button": "export-btn", | |
| "Export Function": "exportbugreport()", | |
| "Language Selector": "language-select", | |
| "Bug Navigation (Prev)": "prevbug()", | |
| "Bug Navigation (Next)": "nextbug()", | |
| "Tab Display": "displaybug(", | |
| "Multi-language Dropdown": "typescript", | |
| "Go Language Support": '"go"', | |
| "Stats Display": "total-checked", | |
| } | |
| print("\nFeature Checklist:") | |
| for feature, search_str in features.items(): | |
| found = search_str in content | |
| status = "β" if found else "β" | |
| print(f" {status} {feature}") | |
| # Check file size | |
| file_size = os.path.getsize(html_file) | |
| print(f"\nFile Size: {file_size:,} bytes") | |
| # Count specific patterns | |
| bug_patterns = { | |
| "displayBug function": "function displaybug", | |
| "Navigate bugs": "function navigate", | |
| "Export JSON": "function exportbugreport", | |
| "Display confidence": "displayconfidence", | |
| } | |
| print("\nFunction Presence:") | |
| for pattern_name, pattern in bug_patterns.items(): | |
| count = content.count(pattern) | |
| status = "β" if count > 0 else "β" | |
| print(f" {status} {pattern_name}") | |
| print("\n" + "=" * 70) | |
| print("β FRONTEND CHECK COMPLETED") | |
| print("=" * 70) | |