feat: 重构项目结构并添加平台同步基础架构

- 重构项目目录结构,将功能模块移至 modules/ 目录
- 创建平台同步基础架构,包括发布器基类和 GitHub 发布器
- 新增 UI 状态管理模块 (modules/ui/state.py) 统一管理会话状态
- 更新依赖配置,添加平台同步所需依赖 (httpx, pyperclip)
- 整理文档结构,将所有文档分类移至 docs/ 目录
- 添加 .cursorrules 文件定义项目开发规范
- 清理根目录重复文件,保持项目结构整洁
This commit is contained in:
刘国栋
2026-01-30 10:21:29 +08:00
parent 77d5ec70f8
commit 8f7f082c3d
102 changed files with 33742 additions and 1526 deletions
+52
View File
@@ -0,0 +1,52 @@
"""
移动工具脚本到 scripts/ 目录
"""
from pathlib import Path
import shutil
# 项目根目录
root = Path(__file__).parent
# 需要移动的工具脚本
scripts_to_move = [
"cleanup_duplicate_docs.py",
"move_reorganization_docs.py",
"reorganize_files.py",
"update_imports.py",
"update_doc_references.py",
]
# 目标目录
target_dir = root / "scripts"
target_dir.mkdir(parents=True, exist_ok=True)
def move_scripts():
"""移动工具脚本到 scripts/ 目录"""
moved_count = 0
print("开始移动工具脚本到 scripts/ 目录...\n")
for script_file in scripts_to_move:
src = root / script_file
dest = target_dir / script_file
if src.exists():
if dest.exists():
print(f"⚠ 跳过: {script_file} (目标位置已存在)")
else:
try:
shutil.move(str(src), str(dest))
print(f"✓ 已移动: {script_file} -> scripts/")
moved_count += 1
except Exception as e:
print(f"✗ 移动失败: {script_file} - {e}")
else:
print(f" 不存在: {script_file}")
print(f"\n✅ 移动完成!")
print(f" - 已移动: {moved_count} 个文件")
print(f"\n📌 这些脚本现在位于: scripts/")
print(f" 使用方式: python scripts/script_name.py")
if __name__ == "__main__":
move_scripts()