← 返回 Skills 市场
yance-dev

Doc2md

作者 Yance · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
39
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install doc2mdyc
功能描述
Use when the user wants to convert local PDF, DOCX, or PPTX files into Markdown with the packaged doc2md CLI, especially for batch conversion, recursive fold...
使用说明 (SKILL.md)

Doc2md

Overview

This skill provides a packaged doc2md CLI for converting local PDF, DOCX, and PPTX files into Markdown through the doc2md platform API.

Use this skill when the user needs a ready-to-run command-line workflow instead of writing custom conversion code.

Bundled Files

  • Windows binary: scripts/doc2md-cli.exe
  • Linux binary: scripts/doc2md-cli

Both binaries are statically linked and do not require an extra runtime.

Prerequisites

  • A valid doc2md bearer token
  • Network access to the doc2md API service
  • Input files in PDF, DOCX, or PPTX format

Configuration can be provided with either:

  • Environment variables: DOC2MD_API_BASE_URL, DOC2MD_BEARER_TOKEN
  • Config file: ~/.doc2md/config.json

Environment variables take precedence over the config file.

Usage

Windows PowerShell

$env:DOC2MD_BEARER_TOKEN = 'your-jwt'
$env:DOC2MD_API_BASE_URL = 'http://192.168.99.85:5173'

.\scripts\doc2md-cli.exe -output-dir .\converted .\document.pdf

Linux

export DOC2MD_BEARER_TOKEN='your-jwt'
export DOC2MD_API_BASE_URL='http://192.168.99.85:5173'

./scripts/doc2md-cli -output-dir ./converted ./document.pdf

Common Commands

# Convert one folder recursively
./scripts/doc2md-cli -output-dir ./converted ./docs/

# Convert multiple inputs in parallel
./scripts/doc2md-cli -output-dir ./converted -concurrency 4 ./doc1.pdf ./doc2.docx ./folder/

Flags

Flag Default Description
-output-dir required Directory that receives extracted results
-converter mineru Backend converter: mineru or marker
-recursive true Scan directories recursively
-keep-zip false Keep result_clean.zip after extraction
-overwrite true Overwrite existing output directories
-concurrency 1 Number of files processed in parallel
-poll-interval 5s Job polling interval
-job-timeout 24h Per-file timeout
-http-timeout 2m Per-request HTTP timeout

Output Behavior

  • Each input document is written to its own subdirectory under -output-dir
  • The CLI prints timestamped progress and per-file status to stdout
  • Ctrl+C cancels remaining work gracefully
  • The process exits non-zero when any conversion fails

Config File Example

{
  "apiBaseUrl": "http://192.168.99.85:5173",
  "bearerToken": "your-jwt"
}

Save this file as ~/.doc2md/config.json when environment variables are not convenient.

Troubleshooting

  • Authentication failure: verify DOC2MD_BEARER_TOKEN
  • Connection failure: verify DOC2MD_API_BASE_URL and service reachability
  • Empty output directory: confirm the input file type is supported and the API job completed successfully
  • Existing output overwritten unexpectedly: pass a safer output directory or adjust -overwrite
安全使用建议
Before installing or using this skill, confirm that the referenced CLI files are actually present in the package you receive. Only set DOC2MD_API_BASE_URL to an endpoint you trust or control, treat DOC2MD_BEARER_TOKEN as a secret, and avoid recursive conversion of folders containing sensitive, regulated, or unrelated documents unless you are comfortable uploading their contents to that API.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is converting PDF, DOCX, and PPTX files to Markdown through the doc2md platform API; sending document content to an API is purpose-aligned, but the skill does not explicitly spell out privacy or retention implications.
Instruction Scope
Instructions are user-directed command examples for selected files or folders, with disclosed flags for recursion, concurrency, output overwriting, timeouts, and cancellation.
Install Mechanism
The text claims bundled Windows and Linux CLI binaries under scripts/, but the reviewed package contains only SKILL.md; this is a packaging/coherence issue rather than evidence of hidden behavior.
Credentials
Network access, a bearer token, and optional recursive local document processing are proportionate for API-based conversion, but recursive uploads can expose more local content than intended if the user chooses a broad folder.
Persistence & Privilege
The only persistence described is an optional ~/.doc2md/config.json containing the API base URL and bearer token; no background worker, privilege escalation, or automatic persistence is described.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install doc2mdyc
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /doc2mdyc 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the doc2md command-line skill. - Provides ready-to-run Windows and Linux CLI binaries for converting PDF, DOCX, and PPTX files to Markdown via the doc2md API. - Supports batch conversion, recursive folder processing, and concurrent processing with custom flags. - Simple setup using environment variables or a config file for API url and bearer token authentication. - Offers robust command-line options for output control, converter selection, concurrency, and timeouts. - Includes troubleshooting guidance and usage examples for both Windows PowerShell and Linux shells.
元数据
Slug doc2mdyc
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Doc2md 是什么?

Use when the user wants to convert local PDF, DOCX, or PPTX files into Markdown with the packaged doc2md CLI, especially for batch conversion, recursive fold... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 39 次。

如何安装 Doc2md?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install doc2mdyc」即可一键安装,无需额外配置。

Doc2md 是免费的吗?

是的,Doc2md 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Doc2md 支持哪些平台?

Doc2md 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Doc2md?

由 Yance(@yance-dev)开发并维护,当前版本 v1.0.0。

💬 留言讨论