Files
blog/tmp_extract.py
T
2026-06-01 17:57:22 +08:00

19 lines
798 B
Python

# Read bot-go main.go to get TG poll and admin panel startup code
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "r", encoding="utf-8", errors="replace") as f:
bot_main = f.read()
# Read current write-go main.go
with open(r"E:\GitHub\blog\write-go\cmd\writeserver\main.go", "r", encoding="utf-8", errors="replace") as f:
write_main = f.read()
# Save for inspection
with open(r"E:\GitHub\blog\tmp_bot.txt", "w", encoding="utf-8") as f:
f.write("=== BOT LENGTH: " + str(len(bot_main)) + " ===\n")
f.write(bot_main[:200])
with open(r"E:\GitHub\blog\tmp_write.txt", "w", encoding="utf-8") as f:
f.write("=== WRITE LENGTH: " + str(len(write_main)) + " ===\n")
f.write(write_main[:200])
print("Extracted both files, lengths:", len(bot_main), len(write_main))