Files
blog/tmp_patch2.py
T

12 lines
562 B
Python
Raw Normal View History

2026-06-01 17:57:22 +08:00
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "r", encoding="utf-8", errors="replace") as f:
content = f.read()
# Fix the import block formatting
content = content.replace('"writebot/internal/writeserver"\n\t"write-server/pkg/posts"\n\n)', '"writebot/internal/writeserver"\n\t"write-server/pkg/posts"\n)')
# Fix the weird indentation on "os"
content = content.replace('\t\t"os"', '\t"os"')
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "w", encoding="utf-8", errors="replace") as f:
f.write(content)
print("Fixed formatting")