返回顶部
t

tistory-publishTistory自动发布

Automate Tistory blog publishing via OpenClaw Playwright CDP. Supports any post format — handles TinyMCE editor manipulation, OG card insertion, banner upload, tag registration, category setting, and representative image selection. Includes template presets (mk-review, simple-post). Works around Tistory's isTrusted event filtering.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 5.1.4
安全检测
已通过
408
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

tistory-publish

Tistory 发布

Tistory 博客通用自动发布技能。可以自动发布任何格式的文章。

自 Tistory Open API 终止(2024年2月)以来,提供唯一的自动化路径——浏览器自动化。

前提条件

  • - OpenClaw 浏览器服务(Chrome CDP,默认端口 18800)
  • Tistory Kakao 登录完成(在 OpenClaw Chrome 中)
  • Python 3 + Playwright(pip install playwright)
  • Node.js 18+(生成横幅时,可选)
  • (可选)Kakao 凭证文件 — 用于登录会话过期时恢复(scripts/login.sh --cred-file <路径>)
- JSON 格式:{email: ..., password: ...} - 或键值格式:email: ...\npassword: ... - publish.sh 不读取凭证(登录仅由 login.sh 处理)

结构

tistory-publish/
├── SKILL.md # 本文件
├── scripts/
│ ├── tistory-publish.js # 核心 — 编辑器操作函数集合
│ ├── publish.sh # 通用发布脚本
│ └── login.sh # Kakao 登录会话恢复
└── templates/
└── simple-post/ # 示例:简单文章发布
└── RUNBOOK.md

快速开始

bash

最简单的发布


bash scripts/publish.sh \
--title 文章标题 \
--body-file body.html \
--category 分类名称 \
--blog your-blog.tistory.com

每日经济评论(使用模板)

bash scripts/publish.sh \ --template mk-review \ --article-title 文章标题 \ --body-file body.html \ --banner /tmp/banner.jpg \ --tags 每日经济,经济新闻

横幅 + 标签 + 私密

bash scripts/publish.sh \ --title 文章标题 \ --body-file body.html \ --category 分类名称 \ --banner /tmp/banner.jpg \ --tags 标签1,标签2,标签3 \ --private

发布脚本选项(publish.sh)

选项必需说明
--title文章标题
--body-file
✅ | 正文 HTML 文件路径 | | --category | ✅ | 分类名称(与编辑器中显示的名称一致) | | --template | | 模板预设(mk-review, simple-post) | | --article-title | | 用于 mk-review 的文章标题(自动添加日期前缀) | | --tags | | 逗号分隔的标签列表 | | --banner | | 横幅图片文件路径 | | --blog | | 博客域名(默认:tistory.com 第一个博客) | | --cdp-port | | OpenClaw Chrome CDP 端口(默认:18800) | | --helper | | tistory-publish.js 路径(默认:scripts/ 目录内) | | --private | | 私密发布 |

模板预设

名称分类博客标题格式横幅
simple-post(直接指定)(直接指定)(直接指定)可选

要添加自己的预设,请在 templates/ 下创建文件夹,并使用 publish.sh --template <名称>。

自动处理项目

脚本按顺序处理:

  1. 1. 打开新文章页面
  2. 注入 JS 辅助函数
  3. 选择分类(ARIA 组合框 → Playwright 点击)
  4. 输入标题(通过 base64 解码处理韩文)
  5. 插入正文 HTML
  6. 上传横幅图片(附件→照片菜单 → 文件输入)
  7. 生成 OG 卡片(占位符 URL → Enter 键 → 卡片渲染)
  8. 设置代表图片
  9. 注册标签
  10. 发布(公开/私密)

正文 HTML 编写规则

  • - 使用

    标签

  • 段落 = 多个句子组合(一个

    包含 2~4 个句子)

  • OG 卡片位置:

  • 分隔线:

添加模板

可以在 templates/ 目录下创建新文件夹,添加自己的工作流程:

templates/my-template/
├── RUNBOOK.md # 发布顺序
├── TEMPLATE.md # 稿件编写模板
└── banner.js # 横幅生成脚本(可选)

主要 JS 函数(tistory-publish.js)

内容

  • - insertContent(html) — 将 HTML 插入 TinyMCE
  • buildBlogHTML({intro, articles}) — 结构化数据 → HTML 转换

OG 卡片

  • - getOGPlaceholders() — 占位符 URL 列表
  • prepareOGPlaceholder(url) — 占位符 → URL 文本替换
  • verifyOGCard(url) — 确认卡片渲染

元数据

  • - setTags(tags[]) — 注册标签
  • setRepresentImageFromEditor() — 设置代表图片

横幅

  • - verifyBannerUpload() — 确认上传

已知限制

  • - 忽略 isTrusted=false 事件 → OG/标签需要绕过逻辑
  • 分类为 ARIA 组合框 → 需要 Playwright 点击
  • 代表图片选择器可能随 Tistory 更新而改变

变更历史

请参考 CHANGELOG.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 tistory-publish-1776283777 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 tistory-publish-1776283777 技能

通过命令行安装

skillhub install tistory-publish-1776283777

下载

⬇ 下载 tistory-publish v5.1.4(免费)

文件大小: 24.91 KB | 发布时间: 2026-4-16 17:39

v5.1.4 最新 2026-4-16 17:39
Remove internal templates (mk-review, anthropic-daily, openclaw-release). login.sh requires --cred-file arg. No internal paths in published code.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部