16 lines
502 B
Python
16 lines
502 B
Python
import re
|
|
|
|
# Fix tgcore - remove helpers dependency
|
|
path = r"E:\GitHub\blog\bot-go\internal\tgcore\tgcore.go"
|
|
with open(path, "rb") as f:
|
|
content = f.read().decode("utf-8")
|
|
|
|
content = re.sub(r'\t"writebot/internal/helpers"\r?\n', '', content)
|
|
# Replace helpers.CheckPort with inline check
|
|
content = content.replace('helpers.CheckPort', 'checkPort')
|
|
content = content.replace('helpers.GetLanIP', 'getLanIP')
|
|
|
|
with open(path, "wb") as f:
|
|
f.write(content.encode("utf-8"))
|
|
print("tgcore fixed")
|