xhs-md-to-plain-text

📁 daqi/daqi-skills 📅 2 days ago
1
总安装量
1
周安装量
#48668
全站排名
安装命令
npx skills add https://github.com/daqi/daqi-skills --skill xhs-md-to-plain-text

Agent 安装分布

amp 1
opencode 1
kimi-cli 1
codex 1
claude-code 1

Skill 文档

XHS Markdown → Plain Text

把 Markdown 里的标记(标题 #、加粗 **、列表符号、引用 >、链接语法等)去掉,输出为 .txt,方便直接粘贴到小红书。

使用方法

Step 0:设置 SKILL_DIR

SKILL_DIR="/path/to/xhs-md-to-plain-text"

Step 1:生成纯文本

  • 生成完整文本(全文件去标记)
npx -y bun ${SKILL_DIR}/scripts/md2text.ts /path/to/article.md --out xhs-img
  • 只抽取 ## 正文内容 到 ## 标签 之间(更适合直接发正文)
npx -y bun ${SKILL_DIR}/scripts/md2text.ts /path/to/article.md --body-only --out xhs-img/body.txt

参数

npx -y bun ${SKILL_DIR}/scripts/md2text.ts <markdown-file> [options]

Options:
  --out <path>       输出文件路径或输出目录(默认: xhs-img)
  --body-only        仅抽取“正文内容”段(## 正文内容 → ## 标签)