wrdler / remove_radar_functions.py
Surn's picture
Version 0.0.2 - not working, but key items are in place
6829252
raw
history blame
1.72 kB
#!/usr/bin/env python3
"""
Script to remove radar/scope visualization functions from ui.py (Sprint 3)
"""
def remove_radar_functions():
ui_file = "wrdler/ui.py"
with open(ui_file, 'r', encoding='utf-8') as f:
lines = f.readlines()
# Find line numbers to remove
# Based on grep output: lines 872-1089 contain the three radar functions
# We need to remove from the start of get_scope_image to the end of _render_radar
start_marker = "def get_scope_image("
end_marker = "def _render_grid("
new_lines = []
skip_mode = False
for i, line in enumerate(lines, 1):
if start_marker in line:
skip_mode = True
# Add comment about removal
new_lines.append("\n")
new_lines.append("# NOTE: Radar/scope visualization functions removed for Wrdler (Sprint 3)\n")
new_lines.append("# - get_scope_image() removed\n")
new_lines.append("# - _create_radar_scope() removed\n")
new_lines.append("# - _render_radar() removed\n")
new_lines.append("# Wrdler uses simplified 8x6 grid with no scope visualization\n")
new_lines.append("\n")
continue
if end_marker in line and skip_mode:
skip_mode = False
# Don't skip this line, it's the start of the next function
if not skip_mode:
new_lines.append(line)
# Write back
with open(ui_file, 'w', encoding='utf-8') as f:
f.writelines(new_lines)
print(f"[OK] Removed radar functions from {ui_file}")
removed_lines = len(lines) - len(new_lines)
print(f" Removed {removed_lines} lines")
if __name__ == "__main__":
remove_radar_functions()