poc/project/llmclipboard/README.md
zhukang c8ba96bcf6 docs: enhance README with emojis and better structure
- Add emojis for better visual hierarchy
- Improve documentation structure
- Add cross-platform usage instructions
- Add technical stack details
- Add acknowledgements section
- Enhance contribution guidelines
2025-01-15 21:14:49 +08:00

162 lines
3.5 KiB
Markdown
Raw 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.

# LLMClipboard
一个跨平台的富文本捕获工具提供现代化的GUI界面支持一键将任何应用程序中的富文本内容转换为Markdown格式并保存。
## ✨ 特性
- 🖥️ 现代化图形界面,支持深色/浅色主题
- 📋 智能富文本捕获和格式保持
- ⚡ 快速双击右键保存
- 🔧 可视化配置界面
- 💾 自动保存为Markdown格式
- 🌐 完整的跨平台支持
- 🔄 系统托盘支持,后台运行
- 🎨 自适应系统主题
## 🚀 快速开始
### 环境要求
- Python >= 3.10
- Windows/Linux/MacOS
### 安装步骤
1. 克隆仓库:
```bash
git clone <repository-url>
cd llmclipboard
```
2. 创建虚拟环境:
```bash
uv venv .venv
```
3. 激活虚拟环境:
```bash
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate
```
4. 安装依赖:
```bash
# Windows
.venv\Scripts\python.exe -m pip install -e .
# Linux/MacOS
.venv/bin/python -m pip install -e .
```
## ⚙️ 配置
编辑 `config.ini` 文件:
```ini
[Settings]
# 双击判定的时间阈值(秒)
double_click_threshold = 0.3
# Markdown文件保存路径
save_location = C:\Users\YourName\Documents\Markdown
```
## 📖 使用指南
### 启动程序
```bash
# Windows
.venv\Scripts\python.exe -m llmclipboard.app
# Linux/MacOS
.venv/bin/python -m llmclipboard.app
```
### 基本操作
1. **配置设置**
- 启动程序后在GUI界面设置保存路径
- 根据需要调整双击阈值
- 点击"保存设置"应用更改
2. **开始使用**
- 点击"启动监听"按钮
- 选择任意文本内容
- 快速双击鼠标右键保存
- 文件自动保存为Markdown格式
3. **后台运行**
- 点击最小化按钮,程序会缩小到系统托盘
- 双击托盘图标可重新打开界面
- 右键托盘图标可访问快捷菜单
4. **退出程序**
- 点击"停止监听"停止服务
- 通过托盘菜单退出
- 或按ESC键退出
## 🔧 技术栈
- **GUI框架**: PyQt6
- **主题**: qt-material
- **系统集成**:
- pynput: 鼠标事件监听
- keyboard: 键盘事件处理
- pywin32: Windows系统集成
- **格式转换**: html2text
- **配置管理**: configparser
## 📁 项目结构
```
llmclipboard/
├── llmclipboard/ # 源代码目录
│ ├── __init__.py
│ ├── app.py # 主程序和服务逻辑
│ ├── gui.py # GUI界面实现
├── config.ini # 配置文件
├── README.md # 项目文档
├── pyproject.toml # 项目依赖配置
```
## 🛠️ 开发指南
### 安装开发依赖
```bash
uv pip install -e .
```
### 构建分发包
```bash
uv pip install build
python -m build
```
构建完成后,在 `dist` 目录下可以找到:
- `.tar.gz`: 源码分发包
- `.whl`: Python wheel包
## 🤝 贡献指南
1. Fork 本仓库
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 提交 Pull Request
## 📄 许可证
MIT License - 查看 [LICENSE](LICENSE) 文件了解更多详情
## 🙏 致谢
- [PyQt6](https://www.riverbankcomputing.com/software/pyqt/) - GUI框架
- [qt-material](https://github.com/UN-GCPDS/qt-material) - 现代化主题
- [html2text](https://github.com/Alir3z4/html2text) - HTML转Markdown工具
## 📞 支持与反馈
如果你遇到任何问题或有建议:
1. 提交 [Issue](../../issues)
2. 发送邮件至 [your-email@example.com]