🔄 卡若AI 同步 2026-03-12 23:48 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 11 个

This commit is contained in:
2026-03-12 23:48:16 +08:00
parent a13837fe0f
commit 7651ec37a5
3 changed files with 12 additions and 7 deletions

View File

@@ -94,16 +94,19 @@ python3 /Users/karuo/Documents/个人/卡若AI/02_卡人/水桥_平台
## 飞书 Docx JSON 格式与上传图片/文件
**实际文档即标准**:上传、写入日志或文章时,以飞书导出的 JSON 结构为准,与 API 一致即可稳定写入
**强制规则2026-03-12 起)**:所有飞书文档的 JSON 格式编写、转换、上传,**统一按 W16 飞书JSON格式 SKILL 的 SOP 执行**
| 参考文档 | 说明 |
| 文件 | 说明 |
|:---|:---|
| **参考资料/飞书日志JSON格式与API对照.md** | 基于「2026年2月 突破执行」实际导出整理block_type 对照text/heading4/todo/callout/image/file、写入 API 要点、与脚本对应关系 |
| **参考资料/飞书docx插入图片_API说明.md** | 图片/文件上传:`drive/v1/medias/upload_all` → 获取 `file_token` → 插入 `block_type=12` file 块或 18 gallery |
| **飞书JSON格式_SKILL.md**W16 | 强制操作流程SOP-A/B/C/D/E、block_type 速查卡、Markdown→飞书转换规则、表格决策树 |
| **参考资料/飞书JSON格式全手册.md** | 完整 block_type 枚举v2.0、样式参数、API 接口速查、错误排查、分栏布局 |
| **参考资料/飞书日志JSON格式与API对照.md** | 日志 TNTWF 块结构与 API 对照 |
| **参考资料/飞书docx插入图片_API说明.md** | 图片上传两步走:`upload_all``block_type: 12` file 或 `18` gallery |
- **写日志**`auto_log.build_blocks()` 产出块与上述 JSON 格式一致;插入用 `docx/v1/documents/{id}/blocks/{id}/children`
- **上传图片到日志/文章**:先 `upload_all`parent_type=docx_imageparent_node=文档 obj_token在目标位置插入 `block_type: 12`file`18`gallery脚本见 `feishu_publish_blocks_with_images.py``write_today_log_with_image.py`
- **格式迭代**新增或修改写入逻辑时以「飞书日志JSON格式与API对照」中的块结构为准便于与导出/回写一致
- **写日志**`auto_log.build_blocks()` 产出块与 W16 格式一致;插入用 `docx/v1/documents/{id}/blocks/{id}/children`
- **上传图片到日志/文章**:先 `upload_all`parent_type=docx_imageparent_node=文档 obj_token再插入 `block_type: 12`file`18`gallery
- **表格策略**≤9×9 用 sheet(30)>9×9 用 TSV 正文(2) 回退。table(31) 带 cells 暂不可用9499待飞书开放后升级 W16 SKILL
- **有新 block 类型用到时**说「更新飞书JSON格式 SKILL」追加到 W16。
---