Collapse portal under src/, unify pnpm workspace/scripts, thin VIP topic re-exports, drop orphan vip scaffolds and one-shot scripts, ignore xhs/release, document root commands. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
762 B
Python
17 lines
762 B
Python
# -*- coding: utf-8 -*-
|
|
from pathlib import Path
|
|
import re
|
|
|
|
t = Path("apps/miniprogram/tt/src/data/nomadCodeBook.ts").read_text(encoding="utf-8")
|
|
ph = t.count("配图已省略")
|
|
imgs = t.count("/packageBook/assets/book-images/")
|
|
root = Path("apps/miniprogram/tt/src/packageBook/assets/book-images")
|
|
files = [f for f in root.glob("*") if f.is_file()]
|
|
total = sum(f.stat().st_size for f in files)
|
|
work = Path("apps/miniprogram/scripts/_hackrobot_book/images_budget")
|
|
wfiles = list(work.glob("*")) if work.exists() else []
|
|
wtotal = sum(f.stat().st_size for f in wfiles if f.is_file())
|
|
print(f"placeholders={ph} md_img_refs={imgs}")
|
|
print(f"tt_book_imgs={len(files)} size_mb={total/1024/1024:.2f}")
|
|
print(f"budget_pool={len(wfiles)} size_mb={wtotal/1024/1024:.2f}")
|