微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
17
scripts/ops/_tmp_clean_truncated.py
Normal file
17
scripts/ops/_tmp_clean_truncated.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from _env_paths import ensure_repo_root
|
||||
|
||||
ensure_repo_root()
|
||||
|
||||
out_dir = Path("export/session_summaries/out")
|
||||
deleted = 0
|
||||
for f in sorted(out_dir.glob("*.txt")):
|
||||
size = f.stat().st_size
|
||||
if size > 1400:
|
||||
print(f"删除: {f.name} ({size} bytes)")
|
||||
f.unlink()
|
||||
deleted += 1
|
||||
|
||||
print(f"\n共删除 {deleted} 个被截断的文件")
|
||||
Reference in New Issue
Block a user