# split.py
import re, os, sys
SRC = 'TokensVault.txt' # 你原始的 632KB 单文件
OUT_DIR = 'TokensVault_split'
os.makedirs(OUT_DIR, exist_ok=True)
html = open(SRC, encoding='utf-8').read()
# ---- 1. 抽出 ', html, re.S)
if not m_style:
sys.exit('❌ 找不到 ',
'',
html, count=1, flags=re.S)
new_html = re.sub(r'',
'',
new_html, count=1, flags=re.S)
open(f'{OUT_DIR}/index.html', 'w', encoding='utf-8').write(new_html)
# ---- 4. 打印大小做校验 ----
for f in ('index.html', 'styles.css', 'app.js'):
p = f'{OUT_DIR}/{f}'
print(f'{f:14s} {os.path.getsize(p):>8,} bytes')