@yixiaoermail/cli 3.2.13 → 3.2.15
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/checksums.txt +6 -6
- package/package.json +1 -1
- package/references/cli/command-reference.md +9 -0
- package/references/domains/draft-and-material.md +5 -0
- package/references/get-music-categories.md +10 -7
- package/references/get-music.md +2 -0
- package/references/platforms/article/jianshu.md +2 -4
- package/references/platforms/video/douyin.md +2 -2
- package/references/platforms/video/shipinhao.md +11 -0
- package/references/platforms/video/toutiaohao.md +2 -2
- package/references/workflows/material-workflow.md +21 -0
- package/references/workflows/publish-video.md +2 -0
- package/schemas/platforms/douyin.video.schema.json +2 -6
- package/skills/yixiaoer/SKILL.md +1 -1
- package/skills/yixiaoer/references/cli/command-reference.md +9 -0
- package/skills/yixiaoer/references/domains/draft-and-material.md +5 -0
- package/skills/yixiaoer/references/get-music-categories.md +10 -7
- package/skills/yixiaoer/references/get-music.md +2 -0
- package/skills/yixiaoer/references/platforms/article/jianshu.md +2 -4
- package/skills/yixiaoer/references/platforms/video/douyin.md +2 -2
- package/skills/yixiaoer/references/platforms/video/shipinhao.md +11 -0
- package/skills/yixiaoer/references/platforms/video/toutiaohao.md +2 -2
- package/skills/yixiaoer/references/workflows/material-workflow.md +21 -0
- package/skills/yixiaoer/references/workflows/publish-video.md +2 -0
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
b1a522d983398558604d5eecb495d7f41caee80e0da51eb7e09a039e0cfcef40 yxer-cli-3.2.15-windows-amd64.zip
|
|
2
|
+
8b55e6d450074980db2063123aaeea6a5954bb7a16b66c5f2c95158aefd957c8 yxer-cli-3.2.15-windows-arm64.zip
|
|
3
|
+
d1092bb67d2a6d8bfeb9b38e426a0179be73d5514c516e6b6112c3192da46194 yxer-cli-3.2.15-darwin-amd64.tar.gz
|
|
4
|
+
9943030d44f708d806d1bf56baab2fbfc54f0cfe689f88b0b6fda51716f84a56 yxer-cli-3.2.15-darwin-arm64.tar.gz
|
|
5
|
+
8a31bdb1611f6034b443df46d9315f7da73c6fa5d4251e62950cec72e879be53 yxer-cli-3.2.15-linux-amd64.tar.gz
|
|
6
|
+
d6c884cbf51d942277ea02d3ae6eb4c38042602f1653f4463251734bd73d6fe7 yxer-cli-3.2.15-linux-arm64.tar.gz
|
package/package.json
CHANGED
|
@@ -49,6 +49,7 @@ yxer publish delete preview <task_set_id>
|
|
|
49
49
|
yxer publish delete from-record <task_set_id> --index N [--dry-run]
|
|
50
50
|
yxer publish delete <task_id> [--dry-run]
|
|
51
51
|
yxer publish form start <platform> <type> [--output publish-form.json] [--dry-run]
|
|
52
|
+
yxer publish form account <session.json> [--id <online_account_id>|--index N] [--dry-run]
|
|
52
53
|
yxer publish form inspect <session.json>
|
|
53
54
|
yxer publish form set <session.json> <payload.path> --value '<json-value-or-text>' [--index N] [--source-command <cmd>] [--dry-run]
|
|
54
55
|
yxer publish form choose <session.json> <field> --value-file <query.json> [--id <candidate_id>|--index N] [--account-id <id>] --source-command "yxer query ... --json" [--dry-run]
|
|
@@ -63,6 +64,10 @@ yxer publish form export <session.json> [--output payload.json] [--dry-run]
|
|
|
63
64
|
yxer draft save <payload.json> [--dry-run]
|
|
64
65
|
yxer material create <payload.json> [--dry-run]
|
|
65
66
|
yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>] [--type image|video|file] [--dry-run]
|
|
67
|
+
yxer material list [--name <file_name>] [--type image|video|file] [--page 1] [--size 100]
|
|
68
|
+
yxer material move <material_id> --group-id <group_id> [--dry-run]
|
|
69
|
+
yxer material move-by-name <file_name> --group-id <group_id> [--dry-run]
|
|
70
|
+
yxer material groups [--page 1] [--size 50]
|
|
66
71
|
```
|
|
67
72
|
|
|
68
73
|
### 查询类能力
|
|
@@ -116,6 +121,10 @@ yxer schema get <platform> <type>
|
|
|
116
121
|
- `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
|
|
117
122
|
- `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
|
|
118
123
|
- `yxer material add --file ...` 会自动完成上传和素材登记
|
|
124
|
+
- `yxer material list --name <file_name>` 返回匹配素材及其真实 ID;可配合 `--type image` 筛选图片
|
|
125
|
+
- `yxer material move-by-name <file_name>` 只接受精确文件名匹配;重名时返回候选,必须改用稳定 ID 执行 `material move`
|
|
126
|
+
- `yxer material move` 将已登记素材移动至目标素材分组;正式移动前先执行 `--dry-run`
|
|
127
|
+
- `yxer material groups` 查询可用于 `material move --group-id` 的真实素材分组 ID
|
|
119
128
|
- 查询类操作可以直接执行
|
|
120
129
|
- 已有完整标准 payload 时,发布类操作遵守“validate -> publish --dry-run -> 用户授权 -> publish”顺序;缺账号、字段、资源或动态对象时,先补“查账号 -> prepare/form/schema -> 上传资源 -> 查询复杂对象 -> 填 payload”。
|
|
121
130
|
- 页面式逐步填写可使用 `publish form` 会话;会话只负责本地状态,正式发布路径固定为 `publish form verify -> publish form export -> validate payload.json -> publish payload.json --dry-run -> publish payload.json`
|
|
@@ -22,6 +22,10 @@ yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>]
|
|
|
22
22
|
yxer upload --file <file_path> --bucket material-library
|
|
23
23
|
yxer upload --url <resource_url> --bucket material-library
|
|
24
24
|
yxer material create <payload.json> [--dry-run]
|
|
25
|
+
yxer material list [--name <file_name>] [--type image|video|file] [--page 1] [--size 100]
|
|
26
|
+
yxer material move <material_id> --group-id <group_id> [--dry-run]
|
|
27
|
+
yxer material move-by-name <file_name> --group-id <group_id> [--dry-run]
|
|
28
|
+
yxer material groups [--page 1] [--size 50]
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
## 决策规则
|
|
@@ -29,6 +33,7 @@ yxer material create <payload.json> [--dry-run]
|
|
|
29
33
|
- 用户只说“保存草稿”时,先区分蚁小二草稿和平台草稿,不要自行猜测
|
|
30
34
|
- 用户只想把资源放进素材库时,优先 `material add`
|
|
31
35
|
- 用户已有上传结果,只差登记素材时,再用 `material create`
|
|
36
|
+
- 用户要移动素材库中的已有素材时,优先使用 `material move-by-name <文件名>`;它会通过真实查询结果匹配素材 ID。文件名重名时必须从候选 ID 中选择,再用 `material move`;先以 `--dry-run` 核对请求
|
|
32
37
|
- 草稿和素材写操作必须先 dry-run;资源字段必须保留上传来源,不能手写 key、尺寸或格式
|
|
33
38
|
- 素材任务不自动进入发布主流程;只有用户明确要“上传后马上发布”时,再切回发布域
|
|
34
39
|
- 用户明确说“先存一下,别发”时,停在本域,不擅自回切发布域
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## 调用指令 (Command)
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
yxer query music-categories <account_id> --json
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
抖音账号会返回推荐、热门榜、飙升榜、原创榜等榜单。将结果中的 `yixiaoerId` 和 `yixiaoerName` 一并用于音乐查询:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yxer query music <account_id> --category-id <yixiaoerId> --category-name <yixiaoerName> --json
|
|
10
15
|
```
|
|
11
16
|
|
|
12
17
|
## 参数列表 (Payload Properties)
|
|
@@ -17,14 +22,13 @@
|
|
|
17
22
|
|
|
18
23
|
## 返回结果 (Response)
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
返回一个包含音乐分类对象的数组。
|
|
21
26
|
|
|
22
27
|
```json
|
|
23
28
|
[
|
|
24
29
|
{
|
|
25
30
|
"yixiaoerId": "123",
|
|
26
31
|
"yixiaoerName": "流行",
|
|
27
|
-
"child": [ { "yixiaoerId": "123", "yixiaoerName": "流行" } ],
|
|
28
32
|
"raw": { "id": "123", "name": "流行" }
|
|
29
33
|
}
|
|
30
34
|
]
|
|
@@ -33,9 +37,8 @@
|
|
|
33
37
|
### 复杂对象:CategoryItem
|
|
34
38
|
- `yixiaoerId`: 内部分类 ID。
|
|
35
39
|
- `yixiaoerName`: 分类名称。
|
|
36
|
-
- `child`: **完整路径对象数组**。如果分类有父子级关系,发布表单时通常需要在此处填入整个生成的 `child`。
|
|
37
40
|
- `raw`: 原始平台返回的分类对象。
|
|
38
41
|
|
|
39
42
|
## 后端逻辑说明
|
|
40
43
|
|
|
41
|
-
- **功能**:
|
|
44
|
+
- **功能**: 封装蚁小二标准音乐分类查询接口。
|
package/references/get-music.md
CHANGED
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
yxer query music XXX --query 周杰伦 --json
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
未指定关键词或榜单时,抖音账号默认查询推荐榜。查询其他榜单时,先执行 `yxer query music-categories XXX --json`,再将返回的 `yixiaoerId` 与 `yixiaoerName` 一并传入 `--category-id` 和 `--category-name`。
|
|
65
|
+
|
|
64
66
|
## 注意事项
|
|
65
67
|
- **抖音专用**:`categoryId` 搜索目前仅在抖音平台调用时生效。
|
|
66
68
|
- **透传规则**:`raw` 字段非常关键,某些平台校验严格,必须原样透传。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## 执行逻辑 (Logic Flow)
|
|
15
15
|
1. **内容处理**:确保文章正文符合Jianshu要求的格式。
|
|
16
|
-
2.
|
|
16
|
+
2. **参数装配**:提取标题、正文至 `contentPublishForm`;简书文章不需要封面。
|
|
17
17
|
3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
|
|
18
18
|
|
|
19
19
|
|
|
@@ -53,6 +53,4 @@
|
|
|
53
53
|
|
|
54
54
|
## 相关接口
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
| :--- | :--- | :--- |
|
|
58
|
-
| `covers.key` | `upload` | [资源上传](../../upload-resource.md) |
|
|
56
|
+
简书文章发布不需要上传或传入封面。
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
| 字段名 | 类型 | 必填 | 说明 | 默认值 |
|
|
32
32
|
| :--- | :--- | :--- | :--- | :--- |
|
|
33
33
|
| `formType` | `string` | **是** | 固定为 `task` | `task` |
|
|
34
|
-
| `title` | `string` |
|
|
35
|
-
| `description` | `string` |
|
|
34
|
+
| `title` | `string` | 否 | 抖音视频标题 (1-30 字) | - |
|
|
35
|
+
| `description` | `string` | 否 | 抖音视频描述 (1-1000 字) | - |
|
|
36
36
|
| `horizontalCover` | `object` | 否 | 抖音视频横版封面,使用 `OldCover` 结构;填写在 `contentPublishForm.horizontalCover`,也可用共享字段 `publishArgs.horizontalCover` 自动补齐 | - |
|
|
37
37
|
| `declaration` | `number` | 否 | 声明: 3-内容从 AI 生成, 4-可能引人不适, 5-虚构演绎, 6-危险行为 | - |
|
|
38
38
|
| `location` | `object` | 否 | 抖音视频位置,使用客户端位置结构 `{ isScp, data }`,其中 `data` 为 `PlatformDataItem` | - |
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# 视频号视频发布参数 (WeiXin ShiPinHao Video)
|
|
2
2
|
|
|
3
|
+
## 账号优先
|
|
4
|
+
|
|
5
|
+
视频号视频必须先确认账号有效、由用户选择目标账号,再填写视频资料。新建会话时先执行:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yxer publish form start 视频号 video --output publish-form.json
|
|
9
|
+
yxer publish form account publish-form.json --id <online_account_id>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`form account` 会查询视频号账号并且只接受 `status=1` 的候选;有多个在线账号时必须由用户明确选择 `--id` 或 `--index`。在选择完成前,CLI 拒绝填写表单字段、review 和 export。
|
|
13
|
+
|
|
3
14
|
> [!IMPORTANT]
|
|
4
15
|
> **前提条件 (Prerequisite)**:
|
|
5
16
|
> 在使用本平台的特定参数之前,你 **必须** 已经阅读并理解了 [视频发布首页 (Index)](./index.md) 中定义的 Payload 根结构。本页仅描述 `contentPublishForm` 内部的平台差异化字段。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- “设为头条私密视频”
|
|
14
14
|
|
|
15
15
|
## 执行逻辑 (Logic Flow)
|
|
16
|
-
1.
|
|
16
|
+
1. **标题优化**:头条视频标题限制为 1-30 个字符;CLI 与平台字段口径保持一致。
|
|
17
17
|
2. **标签装配**:识别用户提供的关键词,转换为 `tags` 字符串数组(限制 1-5 个)。
|
|
18
18
|
3. **申明校验**:根据内容来源注入 `declaration` 枚举;若涉及 AI 创作,必须标注为 `3-AI生成`。
|
|
19
19
|
4. **参数装配**:构造 `accountForms[i].contentPublishForm`。
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
| 字段名 | 类型 | 必填 | 说明 | 默认值 |
|
|
25
25
|
| :--- | :--- | :--- | :--- | :--- |
|
|
26
26
|
| `formType` | `string` | **是** | 固定值: `task` | `task` |
|
|
27
|
-
| `title` | `string` | **是** | 视频标题 (1-
|
|
27
|
+
| `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
|
|
28
28
|
| `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
|
|
29
29
|
| `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
|
|
30
30
|
| `declaration` | `number` | 否 | 创作者申明:1-自行拍摄, 2-取自站外, 3-AI生成, 6-虚构演绎故事经历, 7-投资观点仅供参考, 8-健康医疗分享仅供参考 | - |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- 用户只想把资源放进素材库,不立即发布
|
|
8
8
|
- 用户要先上传,再登记成素材
|
|
9
9
|
- 用户要批量准备后续可复用素材
|
|
10
|
+
- 用户要把已有素材移动到另一个素材库分组
|
|
10
11
|
|
|
11
12
|
## 决策树
|
|
12
13
|
|
|
@@ -22,6 +23,24 @@
|
|
|
22
23
|
yxer material add --file .\demo.mp4 --type video
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
### 移动已有素材
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yxer material move-by-name demo.png --group-id <group_id> --dry-run
|
|
30
|
+
yxer material move-by-name demo.png --group-id <group_id>
|
|
31
|
+
|
|
32
|
+
# 文件名重名时,先查询候选并使用真实素材 ID。
|
|
33
|
+
yxer material list --name demo.png --type image
|
|
34
|
+
yxer material move <material_id> --group-id <group_id> --dry-run
|
|
35
|
+
yxer material move <material_id> --group-id <group_id>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
移动前可查询真实分组 ID:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
yxer material groups --page 1 --size 50
|
|
42
|
+
```
|
|
43
|
+
|
|
25
44
|
### 分步素材登记
|
|
26
45
|
|
|
27
46
|
1. `yxer upload --file <path> --bucket material-library`
|
|
@@ -33,6 +52,8 @@ yxer material add --file .\demo.mp4 --type video
|
|
|
33
52
|
|
|
34
53
|
- `material add` 优先于手工 `upload + material create`
|
|
35
54
|
- `material create` 前提是资源已经上传到 `material-library`
|
|
55
|
+
- `material move-by-name` 通过精确文件名匹配查询结果中的真实素材 ID;重名时不自动移动,必须由用户从候选 ID 中选择
|
|
56
|
+
- `material move` 只接受真实素材 ID 和目标分组 ID;先 dry-run 确认目标后再执行
|
|
36
57
|
- 素材任务不等同于发布任务;不需要 `prepare` / `schema fields` / `schema get`,除非用户随后要直接发布
|
|
37
58
|
- 若用户要“上传后马上发布”,完成素材任务后切回对应发布 workflow
|
|
38
59
|
|
|
@@ -22,6 +22,8 @@ yxer schema get <platform> video
|
|
|
22
22
|
- [`payload-sourcing.md`](./payload-sourcing.md)
|
|
23
23
|
- 涉及话题/标签时:[`../topic-tags.md`](../topic-tags.md)
|
|
24
24
|
|
|
25
|
+
视频号视频有额外的账号门禁:必须先执行 `yxer publish form account <session.json> --id <online_account_id>` 从 `status=1` 账号中完成用户选择,再填写视频、封面和平台资料。未完成账号选择时,CLI 会拒绝继续写入表单。
|
|
26
|
+
|
|
25
27
|
## 执行顺序
|
|
26
28
|
|
|
27
29
|
1. 查询账号:`yxer accounts list [platform] [--status 1] [--json]`
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
"title": "Douyin Video Publish Form (Strict Standards)",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"required": [
|
|
5
|
-
"formType"
|
|
6
|
-
"title",
|
|
7
|
-
"description"
|
|
5
|
+
"formType"
|
|
8
6
|
],
|
|
9
7
|
"properties": {
|
|
10
8
|
"formType": {
|
|
@@ -399,9 +397,7 @@
|
|
|
399
397
|
"contentPublishForm": {
|
|
400
398
|
"type": "object",
|
|
401
399
|
"required": [
|
|
402
|
-
"formType"
|
|
403
|
-
"title",
|
|
404
|
-
"description"
|
|
400
|
+
"formType"
|
|
405
401
|
],
|
|
406
402
|
"properties": {
|
|
407
403
|
"formType": {
|
package/skills/yixiaoer/SKILL.md
CHANGED
|
@@ -49,6 +49,7 @@ yxer publish delete preview <task_set_id>
|
|
|
49
49
|
yxer publish delete from-record <task_set_id> --index N [--dry-run]
|
|
50
50
|
yxer publish delete <task_id> [--dry-run]
|
|
51
51
|
yxer publish form start <platform> <type> [--output publish-form.json] [--dry-run]
|
|
52
|
+
yxer publish form account <session.json> [--id <online_account_id>|--index N] [--dry-run]
|
|
52
53
|
yxer publish form inspect <session.json>
|
|
53
54
|
yxer publish form set <session.json> <payload.path> --value '<json-value-or-text>' [--index N] [--source-command <cmd>] [--dry-run]
|
|
54
55
|
yxer publish form choose <session.json> <field> --value-file <query.json> [--id <candidate_id>|--index N] [--account-id <id>] --source-command "yxer query ... --json" [--dry-run]
|
|
@@ -63,6 +64,10 @@ yxer publish form export <session.json> [--output payload.json] [--dry-run]
|
|
|
63
64
|
yxer draft save <payload.json> [--dry-run]
|
|
64
65
|
yxer material create <payload.json> [--dry-run]
|
|
65
66
|
yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>] [--type image|video|file] [--dry-run]
|
|
67
|
+
yxer material list [--name <file_name>] [--type image|video|file] [--page 1] [--size 100]
|
|
68
|
+
yxer material move <material_id> --group-id <group_id> [--dry-run]
|
|
69
|
+
yxer material move-by-name <file_name> --group-id <group_id> [--dry-run]
|
|
70
|
+
yxer material groups [--page 1] [--size 50]
|
|
66
71
|
```
|
|
67
72
|
|
|
68
73
|
### 查询类能力
|
|
@@ -116,6 +121,10 @@ yxer schema get <platform> <type>
|
|
|
116
121
|
- `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
|
|
117
122
|
- `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
|
|
118
123
|
- `yxer material add --file ...` 会自动完成上传和素材登记
|
|
124
|
+
- `yxer material list --name <file_name>` 返回匹配素材及其真实 ID;可配合 `--type image` 筛选图片
|
|
125
|
+
- `yxer material move-by-name <file_name>` 只接受精确文件名匹配;重名时返回候选,必须改用稳定 ID 执行 `material move`
|
|
126
|
+
- `yxer material move` 将已登记素材移动至目标素材分组;正式移动前先执行 `--dry-run`
|
|
127
|
+
- `yxer material groups` 查询可用于 `material move --group-id` 的真实素材分组 ID
|
|
119
128
|
- 查询类操作可以直接执行
|
|
120
129
|
- 已有完整标准 payload 时,发布类操作遵守“validate -> publish --dry-run -> 用户授权 -> publish”顺序;缺账号、字段、资源或动态对象时,先补“查账号 -> prepare/form/schema -> 上传资源 -> 查询复杂对象 -> 填 payload”。
|
|
121
130
|
- 页面式逐步填写可使用 `publish form` 会话;会话只负责本地状态,正式发布路径固定为 `publish form verify -> publish form export -> validate payload.json -> publish payload.json --dry-run -> publish payload.json`
|
|
@@ -22,6 +22,10 @@ yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>]
|
|
|
22
22
|
yxer upload --file <file_path> --bucket material-library
|
|
23
23
|
yxer upload --url <resource_url> --bucket material-library
|
|
24
24
|
yxer material create <payload.json> [--dry-run]
|
|
25
|
+
yxer material list [--name <file_name>] [--type image|video|file] [--page 1] [--size 100]
|
|
26
|
+
yxer material move <material_id> --group-id <group_id> [--dry-run]
|
|
27
|
+
yxer material move-by-name <file_name> --group-id <group_id> [--dry-run]
|
|
28
|
+
yxer material groups [--page 1] [--size 50]
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
## 决策规则
|
|
@@ -29,6 +33,7 @@ yxer material create <payload.json> [--dry-run]
|
|
|
29
33
|
- 用户只说“保存草稿”时,先区分蚁小二草稿和平台草稿,不要自行猜测
|
|
30
34
|
- 用户只想把资源放进素材库时,优先 `material add`
|
|
31
35
|
- 用户已有上传结果,只差登记素材时,再用 `material create`
|
|
36
|
+
- 用户要移动素材库中的已有素材时,优先使用 `material move-by-name <文件名>`;它会通过真实查询结果匹配素材 ID。文件名重名时必须从候选 ID 中选择,再用 `material move`;先以 `--dry-run` 核对请求
|
|
32
37
|
- 草稿和素材写操作必须先 dry-run;资源字段必须保留上传来源,不能手写 key、尺寸或格式
|
|
33
38
|
- 素材任务不自动进入发布主流程;只有用户明确要“上传后马上发布”时,再切回发布域
|
|
34
39
|
- 用户明确说“先存一下,别发”时,停在本域,不擅自回切发布域
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## 调用指令 (Command)
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
yxer query music-categories <account_id> --json
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
抖音账号会返回推荐、热门榜、飙升榜、原创榜等榜单。将结果中的 `yixiaoerId` 和 `yixiaoerName` 一并用于音乐查询:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yxer query music <account_id> --category-id <yixiaoerId> --category-name <yixiaoerName> --json
|
|
10
15
|
```
|
|
11
16
|
|
|
12
17
|
## 参数列表 (Payload Properties)
|
|
@@ -17,14 +22,13 @@
|
|
|
17
22
|
|
|
18
23
|
## 返回结果 (Response)
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
返回一个包含音乐分类对象的数组。
|
|
21
26
|
|
|
22
27
|
```json
|
|
23
28
|
[
|
|
24
29
|
{
|
|
25
30
|
"yixiaoerId": "123",
|
|
26
31
|
"yixiaoerName": "流行",
|
|
27
|
-
"child": [ { "yixiaoerId": "123", "yixiaoerName": "流行" } ],
|
|
28
32
|
"raw": { "id": "123", "name": "流行" }
|
|
29
33
|
}
|
|
30
34
|
]
|
|
@@ -33,9 +37,8 @@
|
|
|
33
37
|
### 复杂对象:CategoryItem
|
|
34
38
|
- `yixiaoerId`: 内部分类 ID。
|
|
35
39
|
- `yixiaoerName`: 分类名称。
|
|
36
|
-
- `child`: **完整路径对象数组**。如果分类有父子级关系,发布表单时通常需要在此处填入整个生成的 `child`。
|
|
37
40
|
- `raw`: 原始平台返回的分类对象。
|
|
38
41
|
|
|
39
42
|
## 后端逻辑说明
|
|
40
43
|
|
|
41
|
-
- **功能**:
|
|
44
|
+
- **功能**: 封装蚁小二标准音乐分类查询接口。
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
yxer query music XXX --query 周杰伦 --json
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
未指定关键词或榜单时,抖音账号默认查询推荐榜。查询其他榜单时,先执行 `yxer query music-categories XXX --json`,再将返回的 `yixiaoerId` 与 `yixiaoerName` 一并传入 `--category-id` 和 `--category-name`。
|
|
65
|
+
|
|
64
66
|
## 注意事项
|
|
65
67
|
- **抖音专用**:`categoryId` 搜索目前仅在抖音平台调用时生效。
|
|
66
68
|
- **透传规则**:`raw` 字段非常关键,某些平台校验严格,必须原样透传。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## 执行逻辑 (Logic Flow)
|
|
15
15
|
1. **内容处理**:确保文章正文符合Jianshu要求的格式。
|
|
16
|
-
2.
|
|
16
|
+
2. **参数装配**:提取标题、正文至 `contentPublishForm`;简书文章不需要封面。
|
|
17
17
|
3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
|
|
18
18
|
|
|
19
19
|
|
|
@@ -53,6 +53,4 @@
|
|
|
53
53
|
|
|
54
54
|
## 相关接口
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
| :--- | :--- | :--- |
|
|
58
|
-
| `covers.key` | `upload` | [资源上传](../../upload-resource.md) |
|
|
56
|
+
简书文章发布不需要上传或传入封面。
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
| 字段名 | 类型 | 必填 | 说明 | 默认值 |
|
|
32
32
|
| :--- | :--- | :--- | :--- | :--- |
|
|
33
33
|
| `formType` | `string` | **是** | 固定为 `task` | `task` |
|
|
34
|
-
| `title` | `string` |
|
|
35
|
-
| `description` | `string` |
|
|
34
|
+
| `title` | `string` | 否 | 抖音视频标题 (1-30 字) | - |
|
|
35
|
+
| `description` | `string` | 否 | 抖音视频描述 (1-1000 字) | - |
|
|
36
36
|
| `horizontalCover` | `object` | 否 | 抖音视频横版封面,使用 `OldCover` 结构;填写在 `contentPublishForm.horizontalCover`,也可用共享字段 `publishArgs.horizontalCover` 自动补齐 | - |
|
|
37
37
|
| `declaration` | `number` | 否 | 声明: 3-内容从 AI 生成, 4-可能引人不适, 5-虚构演绎, 6-危险行为 | - |
|
|
38
38
|
| `location` | `object` | 否 | 抖音视频位置,使用客户端位置结构 `{ isScp, data }`,其中 `data` 为 `PlatformDataItem` | - |
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# 视频号视频发布参数 (WeiXin ShiPinHao Video)
|
|
2
2
|
|
|
3
|
+
## 账号优先
|
|
4
|
+
|
|
5
|
+
视频号视频必须先确认账号有效、由用户选择目标账号,再填写视频资料。新建会话时先执行:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yxer publish form start 视频号 video --output publish-form.json
|
|
9
|
+
yxer publish form account publish-form.json --id <online_account_id>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`form account` 会查询视频号账号并且只接受 `status=1` 的候选;有多个在线账号时必须由用户明确选择 `--id` 或 `--index`。在选择完成前,CLI 拒绝填写表单字段、review 和 export。
|
|
13
|
+
|
|
3
14
|
> [!IMPORTANT]
|
|
4
15
|
> **前提条件 (Prerequisite)**:
|
|
5
16
|
> 在使用本平台的特定参数之前,你 **必须** 已经阅读并理解了 [视频发布首页 (Index)](./index.md) 中定义的 Payload 根结构。本页仅描述 `contentPublishForm` 内部的平台差异化字段。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- “设为头条私密视频”
|
|
14
14
|
|
|
15
15
|
## 执行逻辑 (Logic Flow)
|
|
16
|
-
1.
|
|
16
|
+
1. **标题优化**:头条视频标题限制为 1-30 个字符;CLI 与平台字段口径保持一致。
|
|
17
17
|
2. **标签装配**:识别用户提供的关键词,转换为 `tags` 字符串数组(限制 1-5 个)。
|
|
18
18
|
3. **申明校验**:根据内容来源注入 `declaration` 枚举;若涉及 AI 创作,必须标注为 `3-AI生成`。
|
|
19
19
|
4. **参数装配**:构造 `accountForms[i].contentPublishForm`。
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
| 字段名 | 类型 | 必填 | 说明 | 默认值 |
|
|
25
25
|
| :--- | :--- | :--- | :--- | :--- |
|
|
26
26
|
| `formType` | `string` | **是** | 固定值: `task` | `task` |
|
|
27
|
-
| `title` | `string` | **是** | 视频标题 (1-
|
|
27
|
+
| `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
|
|
28
28
|
| `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
|
|
29
29
|
| `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
|
|
30
30
|
| `declaration` | `number` | 否 | 创作者申明:1-自行拍摄, 2-取自站外, 3-AI生成, 6-虚构演绎故事经历, 7-投资观点仅供参考, 8-健康医疗分享仅供参考 | - |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- 用户只想把资源放进素材库,不立即发布
|
|
8
8
|
- 用户要先上传,再登记成素材
|
|
9
9
|
- 用户要批量准备后续可复用素材
|
|
10
|
+
- 用户要把已有素材移动到另一个素材库分组
|
|
10
11
|
|
|
11
12
|
## 决策树
|
|
12
13
|
|
|
@@ -22,6 +23,24 @@
|
|
|
22
23
|
yxer material add --file .\demo.mp4 --type video
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
### 移动已有素材
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yxer material move-by-name demo.png --group-id <group_id> --dry-run
|
|
30
|
+
yxer material move-by-name demo.png --group-id <group_id>
|
|
31
|
+
|
|
32
|
+
# 文件名重名时,先查询候选并使用真实素材 ID。
|
|
33
|
+
yxer material list --name demo.png --type image
|
|
34
|
+
yxer material move <material_id> --group-id <group_id> --dry-run
|
|
35
|
+
yxer material move <material_id> --group-id <group_id>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
移动前可查询真实分组 ID:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
yxer material groups --page 1 --size 50
|
|
42
|
+
```
|
|
43
|
+
|
|
25
44
|
### 分步素材登记
|
|
26
45
|
|
|
27
46
|
1. `yxer upload --file <path> --bucket material-library`
|
|
@@ -33,6 +52,8 @@ yxer material add --file .\demo.mp4 --type video
|
|
|
33
52
|
|
|
34
53
|
- `material add` 优先于手工 `upload + material create`
|
|
35
54
|
- `material create` 前提是资源已经上传到 `material-library`
|
|
55
|
+
- `material move-by-name` 通过精确文件名匹配查询结果中的真实素材 ID;重名时不自动移动,必须由用户从候选 ID 中选择
|
|
56
|
+
- `material move` 只接受真实素材 ID 和目标分组 ID;先 dry-run 确认目标后再执行
|
|
36
57
|
- 素材任务不等同于发布任务;不需要 `prepare` / `schema fields` / `schema get`,除非用户随后要直接发布
|
|
37
58
|
- 若用户要“上传后马上发布”,完成素材任务后切回对应发布 workflow
|
|
38
59
|
|
|
@@ -22,6 +22,8 @@ yxer schema get <platform> video
|
|
|
22
22
|
- [`payload-sourcing.md`](./payload-sourcing.md)
|
|
23
23
|
- 涉及话题/标签时:[`../topic-tags.md`](../topic-tags.md)
|
|
24
24
|
|
|
25
|
+
视频号视频有额外的账号门禁:必须先执行 `yxer publish form account <session.json> --id <online_account_id>` 从 `status=1` 账号中完成用户选择,再填写视频、封面和平台资料。未完成账号选择时,CLI 会拒绝继续写入表单。
|
|
26
|
+
|
|
25
27
|
## 执行顺序
|
|
26
28
|
|
|
27
29
|
1. 查询账号:`yxer accounts list [platform] [--status 1] [--json]`
|