congsh
|
0ce1d71a90
|
build: 添加 Windows 打包方案
- 更新 PyInstaller spec 配置
- 简化 build.sh 构建脚本
- 更新 build.bat Windows 打包脚本
- 添加 docs/BUILD.md 打包说明文档
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 15:59:23 +08:00 |
|
congsh
|
e853161975
|
refactor: 重构为极简截图上传工具
- 简化项目定位:从智能工具转为极简截图上传工具
- 移除重型依赖:torch、transformers、paddleocr、SQLAlchemy
- 新增轻量级核心模块:
- config.py: 简化 YAML 配置管理
- database.py: 原生 SQLite 存储
- screenshot.py: 截图功能(全屏/区域)
- uploader.py: 云端上传(支持 custom/telegraph/imgur)
- plugins/ocr.py: 可选 RapidOCR 插件
- 重写主窗口:专注核心功能,移除复杂 UI
- 更新依赖:核心 ~50MB,OCR 可选
- 更新文档:新的 README 和需求分析 v2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 15:50:51 +08:00 |
|
congsh
|
a5e50876a0
|
fix: 添加编码设置和源码大小检查
更改:
1. 开头添加 chcp 65001 设置控制台编码为 UTF-8
2. 添加源码大小检查(步骤 2/5)
- 如果 src 大于 5MB 则警告
- 防止构建过大的 exe
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 14:15:21 +08:00 |
|
congsh
|
313e1f40d8
|
refactor: 重构为纯云端版本,移除所有本地ML库依赖
重大更改:
1. requirements.txt - 移除 paddleocr/paddlepaddle,使用纯 API 版本
2. src/core/ocr.py - 完全重写
- 移除 PaddleOCREngine 和 ensure_paddleocr()
- 移除 numpy 依赖(不再需要)
- 实现完整的 CloudOCREngine
- 支持百度/腾讯/阿里云 OCR API
- 添加自定义 API 支持
3. src/config/settings.py - 简化 OCR 配置
- OCRMode 枚举仅保留 CLOUD
- OCRConfig 添加 provider 字段
4. src/core/__init__.py - 移除 PaddleOCREngine 导出
5. src/gui/main_window.py - 移除 ensure_paddleocr 导入
6. build.bat/build.sh - 简化构建参数
- 移除所有 ML 库的 --exclude-module
- 移除 pyi_hooks 依赖
- 添加 openai/anthropic hidden-import
测试:
- ✓ 所有核心模块导入成功
- ✓ 没有 PaddleOCR 相关错误
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 13:42:46 +08:00 |
|
congsh
|
6fc126b0fe
|
feat: 添加纯云端版本,移除本地ML库依赖
新增文件:
- requirements-core.txt: 核心依赖(无 PaddleOCR/Torch)
- build-cloud.bat: 纯云端版本构建脚本
特点:
- OCR 使用云端 API,无需本地 PaddleOCR
- AI 使用 API (OpenAI/Anthropic)
- 无需 torch/transformers 等本地 ML 库
- 体积更小,兼容性更好,特别是 Python 3.13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 13:34:18 +08:00 |
|
congsh
|
4589289635
|
fix: 修复Python 3.13环境下PyInstaller构建崩溃问题
问题:
- PyInstaller在分析阶段尝试导入torch/transformers等ML库
- 这些库与Python 3.13不兼容,导致"Windows fatal exception: access violation"
- 构建过程无法完成,无法生成exe文件
解决方案:
1. 添加pyi_hooks/pyi_rth_ignore_torch.py运行时hook
- 在PyInstaller分析阶段阻止torch等模块的导入
- 这些模块将在运行时动态安装
2. 添加pyi_hooks/hook-exclude-ml.py和hook-paddleocr.py
- 明确告诉PyInstaller不收集这些ML库
3. 更新build.bat和build.sh
- 使用--runtime-hook和--additional-hooks-dir
- 添加--exclude-module参数排除所有ML库
测试:
- 验证所有hook文件语法正确
- 验证项目核心功能可以在不导入torch的情况下正常工作
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 13:31:49 +08:00 |
|
congsh
|
bb27db586d
|
feat: 添加main()函数作为应用入口
在main_window.py末尾添加main()函数用于启动应用
|
2026-02-12 13:08:37 +08:00 |
|
congsh
|
92a258350a
|
fix: 修复main.py导入路径
使用'src.gui.main_window'而非'gui.main_window'以确保正确导入
|
2026-02-12 11:25:28 +08:00 |
|
congsh
|
a5897a1cd8
|
fix: 移除tkinter依赖,改用PyQt6实现
- message_handler.py: 重写为兼容模式,tkinter不可用时使用PyQt6
- result_widget.py: 完全重写为PyQt6版本
- models/__init__.py: 更新导出BaseModel而非Base
- build.bat: 添加PyQt6的hidden-import参数
这样可以解决Windows打包时tkinter模块找不到的问题
|
2026-02-12 11:25:14 +08:00 |
|
congsh
|
54eeb6f522
|
fix: 修复SQLAlchemy 2.0+兼容性问题
- 使用sqlalchemy.orm.DeclarativeBase替代已弃用的ext.declarative
- 更新Record类继承新的BaseModel基类
- 更新metadata.create_all调用
|
2026-02-12 11:16:55 +08:00 |
|
congsh
|
5ac2bd98d4
|
fix: 添加Pillow等模块的hidden-import参数
- 添加PIL及其子模块的hidden-import
- 添加numpy和pyperclip的hidden-import
- 添加--collect-all pyqt6确保完整打包
|
2026-02-12 11:14:06 +08:00 |
|
congsh
|
a3fc2517a7
|
fix: 移除main_window.py中错误的QtGui.QMessageBox导入
QMessageBox属于QtWidgets模块,不属于QtGui模块
|
2026-02-12 11:11:46 +08:00 |
|
congsh
|
114f432f09
|
fix: 修复打包后ModuleNotFoundError问题
- 添加setup_path()函数处理PyInstaller打包后的路径
- 检测sys.frozen判断是打包环境还是开发环境
- 打包环境使用sys._MEIPASS作为基准路径
- 确保'gui'模块在两种环境下都能正确导入
|
2026-02-12 10:50:33 +08:00 |
|
congsh
|
c6025d9858
|
fix: 修复Windows打包Python 3.13兼容性问题
- 升级SQLAlchemy到2.0.36+以支持Python 3.13
- 升级PyQt6到6.7.0+解决DLL加载问题
- 添加setuptools作为构建依赖
- 添加build/dist清理步骤
- 改进输出格式和错误信息
|
2026-02-12 10:41:27 +08:00 |
|
congsh
|
56b3c5a5b2
|
fix: 完善Windows打包脚本
- 修复 PyInstaller 和 Python 检测逻辑
- 使用 Python 模块检测(instead of where command)
- 统一依赖安装方式
- 添加 setuptools 检测
- 自动安装所有缺失的依赖包
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:38:44 +08:00 |
|
congsh
|
47c86c69ae
|
fix: 修复Windows打包脚本依赖检查
- 检查 Python 是否正确安装
- 检查 PyQt6 是否可用
- 如果缺失则自动安装
- 提供清晰的错误提示和安装指引
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:32:31 +08:00 |
|
congsh
|
8bc9cad901
|
fix: 移除build.bat中文注释避免编码问题
- 将所有中文注释改为英文
- 保持脚本功能不变
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:31:01 +08:00 |
|
congsh
|
a2d731e91b
|
fix: 修复Windows打包脚本
- 简化build.bat,使用Python命令直接打包
- 移除导致错误的^续行符
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:29:01 +08:00 |
|
congsh
|
154d53dbfd
|
feat: 添加轻量打包和OCR自动安装功能
- 添加Windows打包脚本 build.bat
- 更新打包文档 BUILD.md(轻量版方案)
- OCR模块:添加首次运行时自动安装PaddleOCR的功能
- 主窗口:添加OCR安装检测和提示逻辑
- 创建应用入口 src/main.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:14:10 +08:00 |
|
congsh
|
c4a77f8aa4
|
feat: 实现CutThenThink P0阶段核心功能
项目初始化
- 创建完整项目结构(src/, data/, docs/, examples/, tests/)
- 配置requirements.txt依赖
- 创建.gitignore
P0基础框架
- 数据库模型:Record模型,6种分类类型
- 配置管理:YAML配置,支持AI/OCR/云存储/UI配置
- OCR模块:PaddleOCR本地识别,支持云端扩展
- AI模块:支持OpenAI/Claude/通义/Ollama,6种分类
- 存储模块:完整CRUD,搜索,统计,导入导出
- 主窗口框架:侧边栏导航,米白配色方案
- 图片处理:截图/剪贴板/文件选择/图片预览
- 处理流程整合:OCR→AI→存储串联,Markdown展示,剪贴板复制
- 分类浏览:卡片网格展示,分类筛选,搜索,详情查看
技术栈
- PyQt6 + SQLAlchemy + PaddleOCR + OpenAI/Claude SDK
- 共47个Python文件,4000+行代码
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-11 18:21:31 +08:00 |
|