Просмотр исходного кода

docs: add Python environment requirements

- Create requirements.txt with aiohttp and filelock dependencies
- Add prerequisites section to README with Python/Claude Code/Git requirements
- Add pip install command to installation steps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lingfengQAQ 5 месяцев назад
Родитель
Сommit
8c59c56686
2 измененных файлов с 27 добавлено и 0 удалено
  1. 9 0
      .claude/scripts/requirements.txt
  2. 18 0
      README.md

+ 9 - 0
.claude/scripts/requirements.txt

@@ -0,0 +1,9 @@
+# Webnovel Writer - Python Dependencies
+# Python >= 3.8 required
+
+# 核心依赖
+aiohttp>=3.8.0          # 异步 HTTP 客户端(API 调用)
+filelock>=3.0.0         # 文件锁(状态文件并发控制)
+
+# 可选依赖(开发/测试)
+pytest>=7.0.0           # 单元测试

+ 18 - 0
README.md

@@ -87,6 +87,14 @@
 
 ## 快速开始
 
+### 前置要求
+
+| 依赖 | 版本要求 | 说明 |
+|------|---------|------|
+| Python | >= 3.8 | 数据处理脚本运行环境 |
+| Claude Code | 最新版 | Anthropic 官方 CLI 工具 |
+| Git | 任意版本 | 版本控制和章节备份 |
+
 ### 1. 安装
 
 ```bash
@@ -95,8 +103,18 @@ cd your-novel-project
 
 # 克隆插件到 .claude 目录
 git clone https://github.com/lingfengQAQ/webnovel-writer.git .claude
+
+# 安装 Python 依赖
+pip install -r .claude/scripts/requirements.txt
 ```
 
+**Python 依赖说明**:
+
+| 包名 | 用途 |
+|------|------|
+| aiohttp | 异步 HTTP 客户端,用于 Embedding/Reranker API 调用 |
+| filelock | 文件锁,防止 state.json 并发写入冲突 |
+
 ### 2. 初始化项目
 
 ```bash