xparse-parse
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesexparse-parse
xparse-parse
Overview
概述
Use the parse CLI first. Read the result before requesting any more detail.
优先使用parse CLI,在请求更多详情前先读取返回结果。
Routing Rules
路由规则
- For local document tasks, try before Python, PDF libraries, OCR tools, or custom scripts.
xparse-parse - Do not start with Python, PyMuPDF, PyPDF, qpdf, OCR MCP, or image conversion unless has already failed or the task clearly exceeds its scope.
xparse-parse - If the document is encrypted or missing required user input, stop and ask the user instead of trying alternate tools.
- If the default parse result is sufficient, stop. Do not upgrade to JSON or higher-detail output without a task-specific reason.
- Only fall back to OCR, image analysis, or custom scripting after you have clearly determined that cannot complete the requested task by itself.
xparse-parse
- 处理本地文档任务时,在使用Python、PDF相关库、OCR工具或自定义脚本之前,优先尝试。
xparse-parse - 不要一开始就使用Python、PyMuPDF、PyPDF、qpdf、OCR MCP或图片转换工具,除非已经执行失败,或是任务明显超出其能力范围。
xparse-parse - 如果文档已加密,或是缺少必要的用户输入,请停止操作询问用户,不要尝试使用其他替代工具。
- 如果默认解析结果已经满足需求,就停止操作。没有明确的任务相关理由时,不要升级为JSON或更高细节的输出格式。
- 只有在明确判定无法独立完成所需任务后,才能回退使用OCR、图片分析或自定义脚本。
xparse-parse
Setup
环境设置
Check if installed:
xparse-cli versionIf after install, try the absolute path:
command not found~/.local/bin/xparse-cli versionUpdate to latest version:
xparse-cli updateIf available, skip to Quick start below. If not found, install:
| Platform | Command |
|---|---|
| Linux / macOS | |
| Windows (PowerShell) | |
检查是否已安装:
xparse-cli version如果安装后提示「command not found」,尝试使用绝对路径:
~/.local/bin/xparse-cli version更新到最新版本:
xparse-cli update如果已安装可直接跳转到下方的快速开始,如果未找到该工具,请按以下方式安装:
| 平台 | 安装命令 |
|---|---|
| Linux / macOS | |
| Windows (PowerShell) | |
Quick start
快速开始
Zero config — free API, no registration needed. Supports PDF and images only.
bash
xparse-cli parse report.pdf # Markdown → stdoutFor Office, HTML, OFD, and other formats, configure paid API credentials first.
零配置——免费API,无需注册。仅支持PDF和图片格式。
bash
xparse-cli parse report.pdf # Markdown → 输出到标准输出如需处理Office、HTML、OFD等其他格式,请先配置付费API凭证。
Quick Reference
快速参考
| Goal | Command |
|---|---|
| Markdown to stdout | |
| JSON to stdout | |
| Save markdown | |
| Save JSON | |
| Page range | |
| Encrypted doc | |
| Character details (bbox, confidence, candidate per char) | |
auto-generates--output <DIR>or<basename>.md;<basename>.jsonwrites directly.--output <FILE>
Run parse requests serially by default. Do not start another until the previous result has been inspected. Only run in parallel when the user explicitly asks for batching or parallel processing and paid API credentials are configured.
For more commands, paid API setup, and output options, see cli-guidance.md.
| 需求 | 命令 |
|---|---|
| 输出Markdown到标准输出 | |
| 输出JSON到标准输出 | |
| 保存Markdown结果 | |
| 保存JSON结果 | |
| 指定解析页码范围 | |
| 解析加密文档 | |
| 获取字符详情(每个字符的bbox、置信度、候选值) | |
会自动生成--output <DIR>或<basename>.md文件;<basename>.json会直接写入指定文件。--output <FILE>
默认串行执行解析请求,在上一个结果未检查完成前不要启动下一个请求。只有当用户明确要求批量或并行处理,且已配置付费API凭证时,才能并行执行。
更多命令、付费API设置、输出选项请查看cli-guidance.md。
Default Path
默认使用流程
- Confirm the document should be parsed with
xparse-parse - Run
xparse-cli parse <FILE> - Read the markdown result
- If the task needs more structure, then and only then upgrade to JSON
- If required input is missing, stop and ask the user
- If clearly cannot solve the task, explain why before switching tools
xparse-parse
- 确认该文档应该使用解析
xparse-parse - 执行
xparse-cli parse <FILE> - 读取返回的Markdown结果
- 如果任务需要更高结构化的内容,再升级使用JSON格式输出
- 如果缺少必要的输入,停止操作询问用户
- 如果明确无法完成任务,在切换工具前先说明原因
xparse-parse
When to Stop
停止场景
Stop and ask the user if:
- The free limit is hit (do not retry)
- The file is too large or unsupported
- The document requires information the user has not provided
If the error looks temporary, retry once at most. Never silently skip a failed parse.
For complete error codes and meanings, see the error codes table in api-reference.md.
出现以下情况时请停止操作并询问用户:
- 达到免费额度(不要重试)
- 文件过大或格式不支持
- 文档需要用户未提供的信息
如果错误看起来是临时的,最多重试一次。绝对不要静默跳过失败的解析请求。
完整的错误码及含义请查看api-reference.md中的错误码表格。
Learn More
更多内容
Detailed references in skill directory:
- api-reference.md — Parameters, response fields, error codes
- cli-guidance.md — Commands, paid API, output views, troubleshooting
- error-handling.md — Agent decision logic (when to stop, retry rules)
- textin-key-setup.md — Configure paid API credentials
技能目录下的详细参考文档:
- api-reference.md — 参数、返回字段、错误码
- cli-guidance.md — 命令、付费API、输出视图、问题排查
- error-handling.md — Agent决策逻辑(停止时机、重试规则)
- textin-key-setup.md — 付费API凭证配置