12 lines
562 B
Python
12 lines
562 B
Python
from pathlib import Path
|
|
import os
|
|
folder=Path(__file__).parent
|
|
for root in (Path('C:/wechat_rpa'),Path('C:/kefu/wechat_rpa')):
|
|
js=root/'assets/ui/console-app.js'
|
|
text=js.read_text(encoding='utf-8')
|
|
old=' Object.assign(STATE, data);\n'
|
|
assert text.count(old)==1
|
|
text=text.replace(old,old+' syncAttentionBadges();\n')
|
|
temp=js.with_name(js.name+'.edit');temp.write_text(text,encoding='utf-8');os.replace(temp,js)
|
|
(root/'test_review_badges.py').write_text((folder/'test_review_badges.py').read_text(encoding='utf-8'),encoding='utf-8')
|