You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,50 @@ This project includes a **Project Templates** feature (alpha) that allows users
41
41
42
42
---
43
43
44
+
### JSON to HTML Report Conversion
45
+
46
+
This project includes a **standalone JSON-to-HTML converter** (`dist/bin/json-to-html.py`) that converts scan logs to beautiful HTML reports. This tool is designed for reliability and should be used when the main scanner's HTML generation stalls or fails.
47
+
48
+
**When to use:**
49
+
- The main scan completes but HTML report generation hangs or times out
50
+
- You need to regenerate an HTML report from an existing JSON log
51
+
- The user explicitly asks to convert a JSON log to HTML
- ✅ **Standalone** - Works independently of the main scanner
71
+
- ✅ **Auto-opens** - Automatically opens the report in your browser (macOS/Linux)
72
+
- ✅ **No Dependencies** - Uses only Python 3 standard library
73
+
- ✅ **Detailed Output** - Shows progress and file size
74
+
75
+
**Troubleshooting:**
76
+
- If the script fails, check that Python 3 is installed: `python3 --version`
77
+
- If the template is missing, ensure `dist/bin/templates/report-template.html` exists
78
+
- If JSON is invalid, validate it with: `jq empty <file.json>`
79
+
80
+
**Integration:**
81
+
The main scanner (`check-performance.sh`) automatically calls this converter when using `--format json`. If you encounter issues with HTML generation during a scan, you can:
82
+
1. Let the scan complete (JSON will be saved)
83
+
2. Manually run the converter on the saved JSON log
84
+
3. Report the issue so the integration can be improved
85
+
86
+
---
87
+
44
88
## 🔐 Security
45
89
46
90
-[ ]**Sanitize all inputs** using WordPress functions (`sanitize_text_field()`, `sanitize_email()`, `absint()`, etc.)
0 commit comments