AgentMarketMCP / SKILL 资产档案馆

目录 / 文档处理 / NanoDoc--Parse

SKILL 未评级 已上架

NanoDoc--Parse

--- name: nanodoc-parse description: Use when a local PDF, JPG/JPEG, PNG, DOCX, PPTX, or XLSX must be parsed through PDRouter into Markdown, result.json, and images, or when later reading, extraction, search, summary, or Q&A depends on that parse. Triggers include NanoDoc parse, /openapi/nanodoc/parse, and PAODINGAI_API_KEY. Do not use for the direct nanodoc.ai API, unsupported file types, or knowledge-base chat. metadata: {"author":"PAODINGAI","version":"1.0.0","openclaw":{"emoji":"📄","requires":{"env":["PAODINGAI_API_KEY"],"bins":["node","unzip"]}}} --- # NanoDoc Parse Run the bundled script to upload one local supported document to NanoDoc through PDRouter, wait until parsing finishes, and extract the result archive. The archive contains `result.json` (the structured content list), one root-level Markdown file, and figure images under `images/`. Use the returned `output_directory` for summarization, field extraction, search, or Q&A. ## Installation This copy lives at `nanodoc-parse` in the `PaodingAI/skills` repository. For a local Codex installation, place that directory under: ```bash $CODEX_HOME/skills/nanodoc-parse ``` After it is published to `PaodingAI/skills`, `npx skills add PaodingAI/skills` installs the same directory. ## Usage ```bash node scripts/nanodoc-parse.mjs parse \ --file ./report.pdf \ --output ./report-nanodoc ``` From this repository: ```bash node nanodoc-parse/scripts/nanodoc-parse.mjs parse \ --file ./report.pdf \ --output ./report-nanodoc ``` The output directory must be empty or nonexistent. On success, stdout is JSON with `output_directory`, `markdown`, and `result_json`. ## Execution Constraints - Invoke `scripts/nanodoc-parse.mjs` directly. Do not reimplement the upload, wait, or unzip flow. - Route every request through PDRouter at `/openapi/nanodoc/parse`. - Authenticate only with `Authorization: Bearer <PAODINGAI_API_KEY>`. - Do not call NanoDoc directly, including `https://nanodoc.ai` and `/pdrouter/api/v1`. - Do not add internal `X-PD-*` signature headers in this skill. - Parse one document per command. Supported formats are PDF, JPG/JPEG, PNG, DOCX, PPTX, and XLSX. Do not batch files, and do not send legacy DOC/PPT/XLS, GIF, or other unsupported types. - For summaries, search, field extraction, or Q&A, parse first and continue from the extracted files. - Read the Markdown path printed by the script. Use `result.json` for structured blocks, coordinates, tables, formulas, or image paths. - Keep `images/` next to the generated files. Return only the content needed unless the user asks for the full result. - Only inspect or modify the script when the script itself is unavailable, failing, or needs a fix. - The behavior contract below explains what the script does. It is not a checklist to imitate over HTTP. ## When to Use - Use this skill when the user wants NanoDoc to parse a local PDF, JPG/JPEG, PNG, DOCX, PPTX, or XLSX through PDRouter. - Use this skill when later work depends on the document content, such as summarization, field extraction, table reading, or question answering. - Use this skill when the user asks to convert a supported document to Markdown or structured JSON. - Do not use this skill for the direct NanoDoc API (`NANODOC_API_KEY`, `/api/v1/parse`). That flow is `parse-pdf-with-nanodoc`. - Do not use this skill for knowledge-base upload, retrieval, grep, or syllabus reading. This gateway only parses one supported document and returns the archive. - Do not use this skill for legacy DOC/PPT/XLS, GIF, or other unsupported files. The parse endpoint accepts PDF, JPG/JPEG, PNG, DOCX, PPTX, and XLSX filenames with their corresponding file headers. ## Environment Variables - `PAODINGAI_API_KEY`: Required. Bearer API key for PDRouter. If it is missing, the script fails immediately and tells the user to create a Bearer API key in PDRouter, then export it before retrying. Never pass the key as an argument, and never print it. - `PAODINGAI_API_BASE_URL`: Optional. Exact PDRouter origin. Defaults to `https://platform.paodingai.com`. The script does not append `/platform` or `/openapi`. Set it only for a non-production PDRouter. Do not point it at NanoDoc itself. The service code is fixed as `nanodoc`. Callers do not set a service-code variable. ## Default Behavior and Optional Settings - One supported document per invocation. `--file` and `--output` are both required. - The file must use one of `.pdf`, `.jpg`, `.jpeg`, `.png`, `.docx`, `.pptx`, or `.xlsx`. Before uploading, the script checks `%PDF-` for PDF, JPEG/PNG magic bytes for images, and the ZIP magic bytes used by Office Open XML files. - The output directory must be empty or absent. A symbolic link is rejected. - The script performs one synchronous `POST`. It does not poll `/parse/{job_id}`. - The gateway waits up to its configured parse deadline (default 1800 seconds). The script aborts the HTTP call after 1920 seconds. - Input documents are limited to NanoDoc's default 200 MiB upload limit. Downloaded result archives are limited to 512 MiB, and extracted output is limited to 2 GiB. ## Script Behavior 1. Read `PAODINGAI_API_KEY`. Use `PAODINGAI_API_BASE_URL` when set, otherwise `https://platform.paodingai.com`. 2. Reject a missing key, an unsupported extension, an invalid file header, an unsafe path, or a non-empty output directory before uploading. 3. `POST /openapi/nanodoc/parse` with multipart field `file` and `Authorization: Bearer <PAODINGAI_API_KEY>`. 4. On HTTP success, require a zip archive. Validate entries, reject path traversal and symbolic links, then extract into `--output`. 5. Print JSON on stdout: `output_directory`, the root `*.md` path as `markdown`, and `result_json`. 6. On HTTP failure, print JSON `{"error":"...","response":...}` on stderr and exit non-zero. NanoDoc errors look like `{ "code": 422, "error_code": "PARSE_FAILED", "message": "..." }`. PDRouter errors look like `{ "code": "gateway.insufficient_credits" }`. A gateway timeout is HTTP 504 `PARSE_TIMEOUT`. 7. Write progress to stderr. Do not print the API key. ## Resources - Run [scripts/nanodoc-parse.mjs](./scripts/nanodoc-parse.mjs) instead of rewriting the HTTP client.

模型生成摘要(rules/v1 · 2026-11-18 18:15):---
这是模型对公开材料的总结,不是官方声明,请以原链内容为准。

存档时间线

版本存档时间内容哈希内容
v12026-11-18 16:4230ca43bb 可取

版本索引永久保留;内容副本只保留最新 1 份,更早版本仅留索引与哈希(存档时间线的证据链不会因此断裂)。

下载存档内容副本

相关资产

SKILL

AutoDoc NEXT2.0

---

PDF 处理
原作者:paodingai 来源:ClawHub 许可:MIT-0 含内容副本 · 可下载 存档:v1 · 2026-11-18 hash 8f131116
SKILL

Pdf-Fixer2助手

针对Pdf-Fixer提供2能力,帮助用户快速完成相关任务并减少返工

PDF 处理
原作者:u_04a46b4e 来源:腾讯 SkillHub 许可:未标注 含内容副本 · 可下载 存档:v1 · 2026-11-18 hash 06a44482
SKILL

order-daycare-lunch

管理幼儿园的订餐,提供定制餐食

PDF 处理
原作者:jakexiao 来源:ModelScope 许可:MIT 含内容副本 · 可下载 存档:v1 · 2026-11-17 hash f735e4e8
SKILL

document-processor

处理企业文档(PDF、XLSX、DOCX)以提取需求、验证数据和创建专业文档

PDF 处理
原作者:jakexiao 来源:ModelScope 许可:MIT 含内容副本 · 可下载 存档:v1 · 2026-11-17 hash da538542
SKILL

pdf-export

将Markdown文本转换并输出为PDF的技术

PDF 处理Markdown
原作者:jakexiao 来源:ModelScope 许可:MIT 含内容副本 · 可下载 存档:v1 · 2026-11-17 hash 34a4e9a1
SKILL

courseware-quiz-builder

课件智练——AI课件出题与智能复习技能:将PPT、PDF、Word、TXT或Markdown格式的课件及课堂笔记转化为可溯源、可刷题的复习题库

PDF 处理Office 转换Markdown
原作者:user_6b5d0ce7 来源:DeepSkill Market 许可:未标注 含内容副本 · 可下载 存档:v1 · 2026-11-17 hash fe931b88
纠错与举报(发现条目失效、署名有误或涉及侵权?)
提交举报 / 纠错

侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。