开源文档转换工具Pandoc的使用(创建Agent Skill)

Pandoc 是一个由 John MacFarlane 开发的通用文档转换工具,可以支持几十种不同的格式文档之间的相互转换。

Pandoc 可以从以下格式转换:

- Markdown (包括多种变体): `markdown`, `commonmark`, `gfm`, `commonmark_x`

- 文档格式: `docx`, `odt`, `epub`, `html`, `latex`, `texinfo`, `docbook`, `jats`

- 文本标记: `asciidoc`, `textile`, `mediawiki`, `dokuwiki`, `creole`, `org`, `rst`

- 笔记: `jupyter` (ipynb), `t2t`

- 演示文稿: `opml`

- 引用管理: `bibtex`, `biblatex`, `csljson`, `endnotexml`

- 数据格式: `csv`, `tsv`, `json`, `yaml`

- 其他: `fb2`, `haddock`, `typst`, `vimwiki`, `zimwiki`, `djot`

Pandoc 可以转换为以下格式:

- 文档格式: `docx`, `odt`, `epub`, `epub3`, `fb2`, `pdf`, `html`, `html5`, `latex`, `beamer`, `context`, `man`, `ms`, `plain`, `typst`

- 网页格式: `chunkedhtml`, `dzslides`, `revealjs`, `s5`, `slidy`, `slideous`

- 标记语言: `markdown`, `asciidoc`, `textile`, `mediawiki`, `dokuwiki`, `org`, `rst`, `vimwiki`, `zimwiki`, `creole`, `t2t`, `djot`

- 文档结构: `docbook`, `jats`, `opendocument`, `texinfo`, `opml`

- 数据格式: `csljson`, `bibtex`, `biblatex`, `json`, `yaml`

- 引用格式: `nroff`, `markdown_mmd`, `markdown_phpextra`, `markdown_strict`

官方资源

- [Pandoc 官方网站](https://pandoc.org)

- [用户手册](https://pandoc.org/MANUAL.html)

- [安装指南](https://pandoc.org/installing.html)

- [在线试用](https://pandoc.org/app)

- [GitHub 仓库](https://github.com/jgm/pandoc)

- [讨论组](https://groups.google.com/forum/#!forum/pandoc-discuss)

- [常见问题](https://pandoc.org/FAQ.html)

至于如何使用,你不必记住复杂的编程命令,只需要创建一个Pandoc技能就行了。具体操作方法如下:

  1. 在支持Agent Skill的工具(比如阶跃AI桌面助手、CodeBuddy、Trae、Claude Code等)中安装repo2skill技能:https://github.com/zhangyanxs/repo2skill

(文章:开源发布 | Repo2Skill:让你的 OpenCode 像“吸星大法”一样吞噬开源项目

  1. 在AI对话框或者终端命令行中输入指令:请使用repo2skill技能,帮我把这个开源工具https://github.com/jgm/pandoc打包成一个Skill,技能名称为Pandoc。

  1. 接着,你就可以在AI对话框或者终端命令行使用Pandoc技能了。比如输入指令:请使用Pandoc技能将某某Markdown文件转换为Word文件进行另存。

期待WPS AI早日引入Agent Skill功能!

北京
浏览 1595
收藏
5
分享
5 +1
1
+1
全部评论 1
 
WPS反馈小助理小雅
WPS反馈小助理小雅

WPS社区反馈员

感谢您的详细建议,关于您的使用场景和使用诉求,您反馈的问题均已详情记录,这边会提交反馈给技术团队小伙伴进行评估优化,感谢您的理解与支持。
· 广东省
1
回复