wip: 2026-08-11 工作树快照(docs/memory/h5.py/scripts 等 447 项未评审改动,安全提交到 feat 分支)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
"""打包后端修复文件"""
|
||||
import tarfile
|
||||
import os
|
||||
|
||||
base_dir = r"D:\资料\03-项目开发\wecom_it_smart_desk"
|
||||
# 打包时直接用 tasks/h5_ai_task.py 作为文件名
|
||||
files_to_pack = [r"backend\app\tasks\h5_ai_task.py"]
|
||||
tar_path = r"C:\tmp\h5_ai_task_fix.tar.gz"
|
||||
|
||||
with tarfile.open(tar_path, 'w:gz') as tar:
|
||||
for f in files_to_pack:
|
||||
full_path = os.path.join(base_dir, f)
|
||||
# 使用 tasks/h5_ai_task.py 作为arcname,这样解压后会直接覆盖
|
||||
tar.add(full_path, arcname="tasks/h5_ai_task.py")
|
||||
|
||||
print(f'打包完成: {tar_path}')
|
||||
print(f'大小: {os.path.getsize(tar_path)} bytes')
|
||||
Reference in New Issue
Block a user