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
2026-02-12 15:59:23 +08:00
2026-02-12 15:59:23 +08:00
2026-02-12 15:59:23 +08:00

CutThenThink

极简截图上传工具

项目简介

CutThenThink 是一个轻量级的桌面截图工具,专注于:

  • 📷 快速截图(全屏/区域)
  • ☁️ 云端上传(支持多种服务)
  • 📁 历史记录管理
  • 🔍 可选 OCR 文字识别

特点

  • 轻量级:核心依赖仅 ~50MB
  • 可选 OCRRapidOCR 插件,按需安装
  • 无重型依赖:移除了 torch、transformers、paddleocr
  • 简单配置YAML 单文件配置
  • 跨平台:支持 Windows、macOS、Linux

安装

基础安装

pip install -r requirements.txt
python src/main.py

可选:安装 OCR 支持

pip install -r requirements-ocr.txt

使用方法

快捷键

快捷键 功能
Ctrl+Shift+A 全屏截图
Ctrl+Shift+R 区域截图
Ctrl+Shift+U 上传最后截图
Esc 退出

配置

配置文件位于 ~/.cutthenthink/config.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             # 配置文件

开发

# 安装开发依赖
pip install -r requirements.txt

# 运行
python src/main.py

构建

使用 PyInstaller 打包:

pyinstaller CutThenThink.spec

许可证

MIT License

Description
No description provided
Readme 334 KiB
Languages
Python 72.2%
HTML 24.2%
Batchfile 2.8%
Shell 0.8%