🧪 Skills

U2-doc-parser

Parse documents via UniDoc API to convert PDFs, DOCX, images, etc., into Markdown or JSON with sync or async processing and automatic status polling.

v1.0.0
❤️ 0
⬇️ 45
👁 1
Share

Description

Name: u2-doc-parser Description: Parse documents using UniDoc API for conversion to Markdown or JSON format. Supports both synchronous and asynchronous parsing with automatic status polling.

UniDoc Document Parser

Overview

Parse documents using UniDoc API for conversion to Markdown or JSON format. Supports both synchronous and asynchronous parsing with automatic status polling. Ideal for converting various document formats (PDF, DOC, DOCX, images) through a cloud-based API service.

Prereqs / when to read references

If you encounter API errors, network issues, or need to understand the API endpoints, read:

  • references/unidoc-notes.md

Quick start (single document)

# Run from the skill directory
python scripts/unidoc_parse.py /path/to/file.pdf \
  --format md \
  --output ./unidoc-output \
  --mode sync

Options

  • --format md|json (default: md)
    • Output format: Markdown or JSON
  • --mode sync|async (default: sync)
    • Synchronous mode: waits for conversion to complete
    • Asynchronous mode: polls status until completion
  • --func METHOD (default: unisound)
    • Conversion method/algorithm to use
  • --output DIR (default: ./unidoc-output)
    • Output directory for converted files
  • --uid UUID (optional)
    • Custom user ID (auto-generated if not provided)

Output conventions

  • Creates ./unidoc-output/<document_name>/ by default
  • Markdown output: output.md
  • JSON output: output.json
  • Output filename preserves original document name

Notes

  • Requires network connectivity to UniDoc API (http://unidoc.uat.hivoice.cn)
  • Supports multiple file formats: PDF, DOC, DOCX, PNG, JPG, etc.
  • Async mode polls every 1 second until completion
  • Max file size and rate limits depend on API service configuration
  • For large files or batch processing, prefer async mode

Reviews (0)

Sign in to write a review.

No reviews yet. Be the first to review!

Comments (0)

Sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Compatible Platforms

Pricing

Free

Related Configs