Files
snippet-notes/README.md

77 lines
2.0 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.
# 碎片信息记录网站
一个简洁的碎片信息记录工具,支持实时保存、大模型自动生成标题、搜索功能。
## 功能特点
- ✅ 实时保存 - 输入内容自动保存到本地
- ✅ AI生成标题 - 使用大模型自动生成标题
- ✅ 搜索功能 - 快速搜索历史记录
- ✅ 置顶功能 - 重要记录置顶显示
- ✅ 导出功能 - 支持导出为 Markdown 格式
- ✅ 重命名标题 - 自定义修改标题
## 技术栈
- Python 3 + Flask
- Tailwind CSS
- 大模型 API本地 LM Studio
## 安装使用
```bash
# 安装依赖
pip install -r requirements.txt
# 运行服务
python app.py
# 访问地址
http://localhost:19009
```
## 目录结构
```
snippet-notes/
├── app.py # Flask 应用主文件
├── templates/
│ └── index.html # 前端页面
├── static/
│ ├── css/ # CSS 文件目录
│ └── js/ # JS 文件目录
├── data/ # 数据存储目录(不提交到仓库)
│ └── notes.json # 笔记数据
├── logs/ # 日志目录
├── requirements.txt # Python 依赖
├── run.sh # 启动脚本
└── README.md # 说明文档
```
## 大模型配置
默认使用本地 LM Studio
- 地址http://192.168.2.5:1234/v1
- 模型qwen3.5-4b
可在 `app.py` 中修改 `LLM_CONFIG` 配置。
## API 接口
| 接口 | 方法 | 说明 |
|------|------|------|
| `/api/notes` | GET | 获取笔记列表 |
| `/api/notes` | POST | 创建新笔记 |
| `/api/notes/<id>` | GET | 获取笔记详情 |
| `/api/notes/<id>` | PUT | 更新笔记内容 |
| `/api/notes/<id>` | DELETE | 删除笔记 |
| `/api/notes/<id>/pin` | POST | 置顶/取消置顶 |
| `/api/notes/<id>/title` | POST | 重新生成标题 |
| `/api/notes/<id>/rename` | POST | 重命名标题 |
| `/api/search` | GET | 搜索笔记 |
## 版本历史
- v0.2.1 - 新增空内容保存确认、重命名标题功能
- v0.2.0 - 新增置顶、导出功能
- v0.1.0 - 初始版本