Files
MoFin/archive/20260722-scripts-cleanup/remove_xiaoguo2.py
T

18 lines
737 B
Python

import shutil, os, glob
ARCHIVE = '/home/hmo/MoFin/archive/xiaoguo-retired-20260720'
os.makedirs(ARCHIVE, exist_ok=True)
for f in ['/home/hmo/.hermes/scripts/xiaoguo_quick_scan.py',
'/home/hmo/.hermes/scripts/xiaoguo_scanner.py',
'/home/hmo/.hermes/scripts/xiaoguo_news_processor.py',
'/home/hmo/.hermes/scripts/xiaoguo_tunnel_watchdog.sh',
'/home/hmo/xmpp_xiaoguo_bot.py']:
if os.path.exists(f):
shutil.move(f, os.path.join(ARCHIVE, os.path.basename(f)))
print('archived:', f)
# xiaoguo profile dir
p = '/home/hmo/.hermes/profiles/xiaoguo'
if os.path.isdir(p):
print('xiaoguo profile dir exists:', os.listdir(p)[:8])
else:
print('no xiaoguo profile dir')
print('DONE')