Files
Medios-Macina/scripts/remove_old_executor.py

19 lines
576 B
Python
Raw Permalink Normal View History

2026-01-19 03:14:30 -08:00
#!/usr/bin/env python3
from pathlib import Path
p = Path(r"c:\Forgejo\Medios-Macina\CLI.py")
s = p.read_text(encoding='utf-8')
start = s.find('\nif False:')
if start == -1:
print('No if False found')
else:
after = s[start+1:]
idx = after.find('\nfrom rich.markdown import Markdown')
if idx == -1:
print('No subsequent import found')
else:
before = s[:start]
rest = after[idx+1:]
new = before + '\nfrom rich.markdown import Markdown\n' + rest
p.write_text(new, encoding='utf-8')
print('Removed legacy block')