weread-export 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/README.zh.md +50 -0
- package/cordis.patch.yml +14 -0
- package/lib/client.js +796 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +2164 -0
- package/lib/types/api.d.ts +238 -0
- package/lib/types/cache.d.ts +57 -0
- package/lib/types/client/WereadSettingsPanel.d.ts +2 -0
- package/lib/types/client/api.d.ts +69 -0
- package/lib/types/client/index.d.ts +8 -0
- package/lib/types/export.d.ts +45 -0
- package/lib/types/flomo.d.ts +33 -0
- package/lib/types/index.d.ts +44 -0
- package/lib/types/llm.d.ts +31 -0
- package/lib/types/routes.d.ts +57 -0
- package/lib/types/store.d.ts +87 -0
- package/lib/types/tools.d.ts +63 -0
- package/package.json +89 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zhengjy01
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# weread-export
|
|
2
|
+
|
|
3
|
+
微信读书(WeChat Reading)集成插件 for DeepSeek Harness:使用官方 WeRead Skills Agent Gateway(`i.weread.qq.com/api/agent/gateway`)读取书架、划线/想法/书签、书籍信息、阅读统计,并把划线一键导出到 flomo(标签可自定义)。包含 Agent 工具与 Web 设置面板。
|
|
4
|
+
|
|
5
|
+
> 本插件使用**官方 API Key**(`wrk-` 开头),不是 Cookie 抓取方案,稳定且无风控风险。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 本地开发
|
|
11
|
+
dsh plugin --profile web add link:/path/to/weread-export
|
|
12
|
+
# 或发布后从 GitHub / npm 安装
|
|
13
|
+
dsh plugin --profile web add github:zhengjy01/weread-export
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
重启 DSH GUI 后生效。
|
|
17
|
+
|
|
18
|
+
## 配置
|
|
19
|
+
|
|
20
|
+
1. 打开 <https://weread.qq.com/r/weread-skills>,用微信读书账号登录。
|
|
21
|
+
2. 点击「创建 Key」→ 复制(`wrk-` 开头)。
|
|
22
|
+
3. 把 Key 填到 Web 设置页「微信读书」面板,或在对话中调用 `weread_config`。
|
|
23
|
+
4. (可选)在「Flomo」面板配置 flomo API URL / API Key,即可用 `weread_flomo` 导出划线。
|
|
24
|
+
|
|
25
|
+
Key 存于 `~/.dsh/weread-export.json`(权限 0600),同步快照存于 `~/.dsh/weread-export-cache.json`。
|
|
26
|
+
|
|
27
|
+
## 工具
|
|
28
|
+
|
|
29
|
+
| 工具 | 说明 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `weread_status` | 查看配置/缓存/flomo 联动状态(不回显完整 Key) |
|
|
32
|
+
| `weread_config` | 配置或清除 API Key、默认 flomo 标签、导出条数(0=全部)、默认导出目标、本地目录、Notion Token/目标页、LLM 与 prompt 模板;`test: true` 测试连接 |
|
|
33
|
+
| `weread_search` | 书城搜索(书名/作者/评分/在读人数/bookId/链接) |
|
|
34
|
+
| `weread_book` | 书籍详情 + 阅读进度 + 章节目录概览 |
|
|
35
|
+
| `weread_shelf` | 书架(实时或缓存):书名/进度/最近阅读时间/是否读完 |
|
|
36
|
+
| `weread_notes` | 不给 bookId = 笔记本概览;给 bookId = 该书划线 + 想法 |
|
|
37
|
+
| `weread_readdata` | 阅读统计(weekly/monthly/annually/overall) |
|
|
38
|
+
| `weread_sync` | 拉取书架 + 笔记本概览到本地缓存 |
|
|
39
|
+
| `weread_export` | 多目标导出:`dest=flomo`(默认)/`local`(本地 Markdown,`localDir` 必填)/`notion`(本插件独立 Token+目标页);可按 `exportPrompt`/`usePrompt` 用 LLM 按 prompt 整理后导出,`limit` 控制条数 |
|
|
40
|
+
| `weread_flomo` | flomo 快捷导出:#标签可自定义;默认按配置导出条数(0=全部,超长自动拆多条 MEMO),`limit` 可临时覆盖 |
|
|
41
|
+
|
|
42
|
+
## 常见问题
|
|
43
|
+
|
|
44
|
+
- **升级提示(upgrade_info)**:微信读书偶尔要求客户端升级 skill 版本,插件会直接提示升级信息,等待插件更新即可。
|
|
45
|
+
- **接口字段**:网关回包经过官方字段裁剪,本插件按官方文档解析;若某字段缺失会优雅降级展示。
|
|
46
|
+
- **flomo 未配置**:`weread_flomo` 会提示先配置 flomo(复用 dsh-flomo 的凭据文件)。
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# weread-export
|
|
2
|
+
|
|
3
|
+
微信读书(WeChat Reading)集成插件 for DeepSeek Harness:使用官方 WeRead Skills Agent Gateway(`i.weread.qq.com/api/agent/gateway`)读取书架、划线/想法/书签、书籍信息、阅读统计,并把划线一键导出到 flomo(标签可自定义)。包含 Agent 工具与 Web 设置面板。
|
|
4
|
+
|
|
5
|
+
> 本插件使用**官方 API Key**(`wrk-` 开头),不是 Cookie 抓取方案,稳定且无风控风险。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 本地开发
|
|
11
|
+
dsh plugin --profile web add link:/path/to/weread-export
|
|
12
|
+
# 或发布后从 GitHub / npm 安装
|
|
13
|
+
dsh plugin --profile web add github:zhengjy01/weread-export
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
重启 DSH GUI 后生效。
|
|
17
|
+
|
|
18
|
+
## 配置
|
|
19
|
+
|
|
20
|
+
1. 打开 <https://weread.qq.com/r/weread-skills>,用微信读书账号登录。
|
|
21
|
+
2. 点击「创建 Key」→ 复制(`wrk-` 开头)。
|
|
22
|
+
3. 把 Key 填到 Web 设置页「微信读书」面板,或在对话中调用 `weread_config`。
|
|
23
|
+
4. (可选)在「Flomo」面板配置 flomo API URL / API Key,即可用 `weread_flomo` 导出划线。
|
|
24
|
+
|
|
25
|
+
Key 存于 `~/.dsh/weread-export.json`(权限 0600),同步快照存于 `~/.dsh/weread-export-cache.json`。
|
|
26
|
+
|
|
27
|
+
## 工具
|
|
28
|
+
|
|
29
|
+
| 工具 | 说明 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `weread_status` | 查看配置/缓存/flomo 联动状态(不回显完整 Key) |
|
|
32
|
+
| `weread_config` | 配置或清除 API Key、默认 flomo 标签、导出条数(0=全部)、默认导出目标、本地目录、Notion Token/目标页、LLM 与 prompt 模板;`test: true` 测试连接 |
|
|
33
|
+
| `weread_search` | 书城搜索(书名/作者/评分/在读人数/bookId/链接) |
|
|
34
|
+
| `weread_book` | 书籍详情 + 阅读进度 + 章节目录概览 |
|
|
35
|
+
| `weread_shelf` | 书架(实时或缓存):书名/进度/最近阅读时间/是否读完 |
|
|
36
|
+
| `weread_notes` | 不给 bookId = 笔记本概览;给 bookId = 该书划线 + 想法 |
|
|
37
|
+
| `weread_readdata` | 阅读统计(weekly/monthly/annually/overall) |
|
|
38
|
+
| `weread_sync` | 拉取书架 + 笔记本概览到本地缓存 |
|
|
39
|
+
| `weread_export` | 多目标导出:`dest=flomo`(默认)/`local`(本地 Markdown,`localDir` 必填)/`notion`(本插件独立 Token+目标页);可按 `exportPrompt`/`usePrompt` 用 LLM 按 prompt 整理后导出,`limit` 控制条数 |
|
|
40
|
+
| `weread_flomo` | flomo 快捷导出:#标签可自定义;默认按配置导出条数(0=全部,超长自动拆多条 MEMO),`limit` 可临时覆盖 |
|
|
41
|
+
|
|
42
|
+
## 常见问题
|
|
43
|
+
|
|
44
|
+
- **升级提示(upgrade_info)**:微信读书偶尔要求客户端升级 skill 版本,插件会直接提示升级信息,等待插件更新即可。
|
|
45
|
+
- **接口字段**:网关回包经过官方字段裁剪,本插件按官方文档解析;若某字段缺失会优雅降级展示。
|
|
46
|
+
- **flomo 未配置**:`weread_flomo` 会提示先配置 flomo(复用 dsh-flomo 的凭据文件)。
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# weread-export bundle patch: inserts the plugin row into the profile roster.
|
|
2
|
+
# Applied as a profile bundle layer (declared by the `dsh.bundle.patch`
|
|
3
|
+
# manifest field in package.json). Activate with:
|
|
4
|
+
#
|
|
5
|
+
# # local development (link)
|
|
6
|
+
# dsh plugin --profile web add link:/path/to/weread-export
|
|
7
|
+
# # after publishing to GitHub (repo tagged with the `dsh-plugin` topic)
|
|
8
|
+
# dsh plugin --profile web add github:zhengjy01/weread-export
|
|
9
|
+
- insert:
|
|
10
|
+
- id: weread
|
|
11
|
+
name: weread-export
|
|
12
|
+
config:
|
|
13
|
+
announceToAgent: true # 在系统提示中公告插件(工具 + 能力说明)
|
|
14
|
+
enabled: true # 插件总开关
|