File size: 1,163 Bytes
a80c9f6
 
4bfd01e
 
 
a80c9f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Deep dive into champion's advanced capabilities."""
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import champion_gen42 as champ
import os
import tempfile

print("=" * 70)
print("🎮 EXPORT_INTERFACE - Self-Spawning HTTP Server")
print("=" * 70)

# Create temp directory for interface export
output_dir = tempfile.mkdtemp(prefix="champion_interface_")
print(f"Output dir: {output_dir}")

try:
    result = champ.export_interface(output_dir)
    print(f"Result: {result}")
    
    # List what was created
    print("\nGenerated files:")
    for f in os.listdir(output_dir):
        filepath = os.path.join(output_dir, f)
        size = os.path.getsize(filepath)
        print(f"  {f} ({size} bytes)")
        
        # Show content of small files
        if size < 5000:
            print(f"  --- Content of {f} ---")
            with open(filepath, 'r') as file:
                content = file.read()
                print(content[:2000])
            print("  ---")
except Exception as e:
    print(f"Error: {e}")
    import traceback
    traceback.print_exc()