snapshot before merge

This commit is contained in:
zqlit committed 2026-06-01 17:57:22 +08:00
1 parent 2b3b2850f9
commit 21fc65b3ae
145 files changed
+9786 -59

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import re, shutil
# Copy with correct encoding
files_to_fix = [
("bot-go/internal/helpers/helpers.go", "write-go/internal/helpers/helpers.go"),
("bot-go/internal/tgcore/tgcore.go", "write-go/internal/tgcore/tgcore.go"),
("bot-go/internal/tghandlers/tghandlers.go", "write-go/internal/tghandlers/tghandlers.go"),
("bot-go/internal/sessions/sessions.go", "write-go/internal/sessions/sessions.go"),
("bot-go/internal/adminpanel/adminpanel.go", "write-go/internal/adminpanel/adminpanel.go"),
("bot-go/internal/writeserver/writeserver.go", "write-go/internal/writeserver/writeserver.go"),
]
base = r"E:\GitHub\blog"
for src_rel, dst_rel in files_to_fix:
src = base + "\\" + src_rel
dst = base + "\\" + dst_rel
with open(src, "rb") as f:
content = f.read()
text = content.decode("utf-8")
text = re.sub(r'writebot/internal/', 'write-server/internal/', text)
text = text.replace('writebot/internal/config', 'write-server/internal/botconfig')
with open(dst, "wb") as f:
f.write(text.encode("utf-8"))
print(f"OK: {dst_rel}")
print("All fixed with proper UTF-8")