@deepwhale-cn/dsh-douyin-desk 0.0.0-stage → 0.2.0
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 +107 -2
- package/cordis.patch.yml +8 -0
- package/icon.svg +11 -0
- package/lib/client.js +704 -0
- package/lib/core.js +494 -0
- package/lib/index.js +533 -0
- package/lib/ingest.js +220 -0
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepWhale
|
|
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
CHANGED
|
@@ -1,3 +1,108 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://deepwhale.org.cn)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# 深鲸抖音复盘 · dsh-douyin-desk
|
|
4
|
+
|
|
5
|
+
把抖音账号的作品、文案、收藏同步到本地,做**互动复盘**、**发布节奏分析**、**文案库**和**周报**。只读——不发布、不评论、不点赞。
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@deepwhale-cn/dsh-douyin-desk)
|
|
8
|
+
|
|
9
|
+
## 这是什么
|
|
10
|
+
|
|
11
|
+
做内容的人都有个共同问题:发了几十条,哪条值得重发、哪条数据突然掉了,靠翻 App 是查不出来的。
|
|
12
|
+
|
|
13
|
+
这个插件接的是抖音开放平台的官方命令行工具 `douyin-open-cli`(扫码授权),把你的作品列表、互动数据、文案正文、收藏夹拉到本地,然后在桌面端给一个复盘面板:
|
|
14
|
+
|
|
15
|
+
- 作品列表:日期、类型、赞/评/藏/转、封面、完整文案
|
|
16
|
+
- 一句话周报:上周 vs 前一周的赞数变化、互动 Top5、零互动清单、话题分布
|
|
17
|
+
- 文案库:每条都能一键复制,也能"提取正文"把口播/字幕文本拉下来
|
|
18
|
+
- 收藏夹:把刷到的好内容存进本地,当选题池
|
|
19
|
+
|
|
20
|
+
**没有播放量**:官方接口目前只返回赞、评、藏、转。宁可少一个数,也不编一个。
|
|
21
|
+
|
|
22
|
+
## 安装
|
|
23
|
+
|
|
24
|
+
前置:装好官方 CLI 并扫码登录(一次授权 1 天)。
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 1) 装官方 CLI(macOS / Linux)
|
|
28
|
+
tmp_dir="$(mktemp -d)"
|
|
29
|
+
curl --fail --location --proto '=https' --proto-redir '=https' \
|
|
30
|
+
'https://lf-aihub.douyinpic.com/obj/developer/douyin-open-cli/install.sh' \
|
|
31
|
+
--output "$tmp_dir/install.sh" && sh "$tmp_dir/install.sh"
|
|
32
|
+
|
|
33
|
+
# 2) 扫码授权
|
|
34
|
+
douyin-open-cli auth login
|
|
35
|
+
|
|
36
|
+
# 3) 装插件
|
|
37
|
+
dsh plugin install @deepwhale-cn/dsh-douyin-desk
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
装完重启桌面端,在「插件」页会出现「抖音复盘」标签(面板标题:深鲸抖音复盘台)。
|
|
41
|
+
|
|
42
|
+
## 快速开始
|
|
43
|
+
|
|
44
|
+
1. 打开 插件 → 抖音复盘;
|
|
45
|
+
2. 点「同步作品」:拉取最近最多 10 页(每页 30 条),只更新已有记录的互动数,不删本地数据;
|
|
46
|
+
3. 想看某条的正文,点该条的「提取正文」;
|
|
47
|
+
4. 点「生成周报」,下载一份 Markdown 复盘。
|
|
48
|
+
|
|
49
|
+
授权过期后,面板顶部会提示「未登录」,重新运行 `douyin-open-cli auth login` 扫码即可。
|
|
50
|
+
|
|
51
|
+
## 配置
|
|
52
|
+
|
|
53
|
+
| 项 | 默认值 | 说明 |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| 本地缓存目录 | `~/.douyin-desk/` | `works.json` 作品、`favorites.json` 收藏 |
|
|
56
|
+
| CLI 路径 | `~/.local/bin/douyin-open-cli` | 先找 `DOUYIN_CLI` 环境变量,再找 PATH 常见位置 |
|
|
57
|
+
| 同步页数 | 10 页 × 30 条 | 面板固定 10 页;模型工具 `douyin_sync` 可传 `pages`(1–40) |
|
|
58
|
+
| 授权有效期 | 1 天 | 官方策略,过期需重新扫码 |
|
|
59
|
+
|
|
60
|
+
## 它能做什么
|
|
61
|
+
|
|
62
|
+
**面板五个视图**
|
|
63
|
+
- **概览**:作品/赞/藏转总量、互动趋势(本地快照)、发布时段分布、发布节奏建议、爆款候选与低互动清单、话题分布
|
|
64
|
+
- **作品**:搜索、按赞/藏/总互动/时间排序、图文/视频筛选、单条展开、互动增量、复制文案、提取正文、**AI 改写**
|
|
65
|
+
- **文案库**:全文搜索 + 一键复制
|
|
66
|
+
- **体检**:贴文案 → 打分 + 逐条改法(极限词/承诺词/话题数/首句长度/分段/标点)
|
|
67
|
+
- **选题**:从数据里推选题(续集/重发/补做/对标),一键出**发布包**(标题+开头+结构+话题+封面+清单),还能让**模型直接写一版口播脚本**
|
|
68
|
+
- **收藏**:把抖音收藏当对标池,按互动排序、一键打开
|
|
69
|
+
|
|
70
|
+
**自动同步**:打开面板时距上次超过 6 小时自动拉一次(只读),趋势才连得起来。
|
|
71
|
+
|
|
72
|
+
**面板**
|
|
73
|
+
- 作品库:封面 + 文案 + 互动数字,按时间或互动排序
|
|
74
|
+
- 周报导出:互动对比、Top5、零互动、话题分布
|
|
75
|
+
- 文案复制 / 正文提取
|
|
76
|
+
|
|
77
|
+
**给 agent 的模型工具**
|
|
78
|
+
|
|
79
|
+
| 工具 | 用途 |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `douyin_status` | CLI 是否安装、是否登录、授权到期时间 |
|
|
82
|
+
| `douyin_sync` | 同步作品(可带收藏),只读 |
|
|
83
|
+
| `douyin_list` | 按时间或互动列出本地作品 |
|
|
84
|
+
| `douyin_text` | 取某条作品的正文并缓存 |
|
|
85
|
+
| `douyin_report` | 生成周报 Markdown |
|
|
86
|
+
|
|
87
|
+
**HTTP 路由**(同源,面板用):`/douyin-desk/state`、`/douyin-desk/works`、`/douyin-desk/sync`、`/douyin-desk/text`、`/douyin-desk/report`。
|
|
88
|
+
|
|
89
|
+
## 常见问题
|
|
90
|
+
|
|
91
|
+
**为什么没有播放量?**
|
|
92
|
+
官方开放接口当前不返回播放数(只有赞/评/藏/转)。要播放量只能靠 App 截图或第三方灰产,两者都不做。
|
|
93
|
+
|
|
94
|
+
**会不会封号?**
|
|
95
|
+
只调官方授权接口、只读,不模拟点击、不批量互动。风险来源只有官方授权本身;不做任何绕过。
|
|
96
|
+
|
|
97
|
+
**授权为什么只能用一天?**
|
|
98
|
+
平台策略:单次扫码授权 1 天有效。过期后重新扫码即可,不影响本地已同步的数据。
|
|
99
|
+
|
|
100
|
+
**能发作品/回评论吗?**
|
|
101
|
+
不能,也不打算加。写接口另有风险与合规要求;这个插件定位是"复盘与素材库",发布交给人在 App 里做。
|
|
102
|
+
|
|
103
|
+
**多账号?**
|
|
104
|
+
当前 CLI 一次只绑一个账号。换号就重新授权,本地数据会混在一起(后续版本再做分账号目录)。
|
|
105
|
+
|
|
106
|
+
## 许可
|
|
107
|
+
|
|
108
|
+
MIT © DeepWhale
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#111827"/>
|
|
5
|
+
<stop offset="1" stop-color="#1f2937"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="128" height="128" rx="28" fill="url(#g)"/>
|
|
9
|
+
<path d="M62 26v46a16 16 0 1 1-16-16c1.4 0 2.7.2 4 .6V40l34-8v10l-22 5.2z" fill="#f9fafb"/>
|
|
10
|
+
<circle cx="90" cy="86" r="7" fill="#2563eb"/>
|
|
11
|
+
</svg>
|