()
| 223 | |
| 224 | |
| 225 | def main() -> int: |
| 226 | if len(sys.argv) != 2: |
| 227 | print("Usage: parse_results.py <results.json>") |
| 228 | return 1 |
| 229 | |
| 230 | results_file = Path(sys.argv[1]) |
| 231 | if not results_file.exists(): |
| 232 | print(f"Error: {results_file} not found") |
| 233 | return 1 |
| 234 | |
| 235 | analyzer = ResultAnalyzer(results_file) |
| 236 | analyzer.load_results() |
| 237 | |
| 238 | # Print markdown report |
| 239 | print(analyzer.generate_report()) |
| 240 | |
| 241 | # Export AI-readable JSON |
| 242 | ai_data = analyzer.export_for_ai() |
| 243 | ai_file = results_file.with_suffix(".ai.json") |
| 244 | with open(ai_file, "w") as f: |
| 245 | json.dump(ai_data, f, indent=2) |
| 246 | |
| 247 | print(f"\nAI-readable data exported to: {ai_file}") |
| 248 | return 0 |
| 249 | |
| 250 | |
| 251 | if __name__ == "__main__": |
no test coverage detected