Files
cutThenThink/README.md
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

114 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CutThenThink
**极简截图上传工具**
## 项目简介
CutThenThink 是一个轻量级的桌面截图工具,专注于:
- 📷 快速截图(全屏/区域)
- ☁️ 云端上传(支持多种服务)
- 📁 历史记录管理
- 🔍 可选 OCR 文字识别
## 特点
- **轻量级**:核心依赖仅 ~50MB
- **可选 OCR**RapidOCR 插件,按需安装
- **无重型依赖**:移除了 torch、transformers、paddleocr
- **简单配置**YAML 单文件配置
- **跨平台**:支持 Windows、macOS、Linux
## 安装
### 基础安装
```bash
pip install -r requirements.txt
python src/main.py
```
### 可选:安装 OCR 支持
```bash
pip install -r requirements-ocr.txt
```
## 使用方法
### 快捷键
| 快捷键 | 功能 |
|--------|------|
| `Ctrl+Shift+A` | 全屏截图 |
| `Ctrl+Shift+R` | 区域截图 |
| `Ctrl+Shift+U` | 上传最后截图 |
| `Esc` | 退出 |
### 配置
配置文件位于 `~/.cutthenthink/config.yaml`
```yaml
upload:
provider: custom # custom, telegraph, imgur
endpoint: https://...
api_key: your-key
auto_copy: true
screenshot:
format: png # png, jpg, webp
save_path: ~/Pictures/Screenshots
hotkeys:
capture: Ctrl+Shift+A
region: Ctrl+Shift+R
upload: Ctrl+Shift+U
ocr:
enabled: false # 是否启用 OCR
auto_copy: false # 识别后自动复制
```
## 项目结构
```
CutThenThink/
├── src/
│ ├── main.py # 入口
│ ├── config.py # 简化配置
│ ├── core/
│ │ ├── database.py # SQLite 存储
│ │ ├── screenshot.py # 截图功能
│ │ └── uploader.py # 上传功能
│ ├── gui/
│ │ └── main_window.py # 主窗口
│ ├── plugins/ # 可选插件
│ │ └── ocr.py # RapidOCR 插件
│ └── utils/ # 工具函数
├── requirements.txt # 核心依赖
├── requirements-ocr.txt # 可选 OCR
└── config.yaml # 配置文件
```
## 开发
```bash
# 安装开发依赖
pip install -r requirements.txt
# 运行
python src/main.py
```
## 构建
使用 PyInstaller 打包:
```bash
pyinstaller CutThenThink.spec
```
## 许可证
MIT License