M

Memect Ppx

CLAWHUB · Unverified

Parse PDFs and images into Markdown/JSON using the memect-ppx (`ppx`) CLI. Use when the user asks to OCR scanned PDFs or screenshots, extract tables from PDF... Skill: Memect Ppx Owner: lihanghang Summary: Parse PDFs and images into Markdown/JSON using the memect-ppx (ppx) CLI. Use when the user asks to OCR scanned PDFs or screenshots, extract tables from PDF... Tags: latest:0.2.6, markdown:0.0.2, ocr:0.0.2, parser:0.0.2, pdf:0.0.2, table:0.0.2 Version history: v0.2.6 | 2026-05-15T03:48:37.678Z | auto - Updated skill version to 0.2.6. - Improved description with explicit key

62
Rank
84
Safety
961
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 961 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s171w8cksnm4vje9j0qeye09eh85c144:memect-ppx
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-lihanghang-memect-ppx/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

48,174 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: memect-ppx
version: 0.2.6
title: memect-ppx
user-invocable: true
description: >
  Parse PDFs and images into Markdown/JSON using the memect-ppx (`ppx`) CLI.
  Use when the user asks to OCR scanned PDFs or screenshots, extract tables from PDFs,
  convert PDF/image to Markdown, preserve document layout, inspect parsing output.
  Also triggers on: memect-ppx、ppx parse、解析PDF、图片转文字、扫描件识别、扫描件转文字、提取表格、
  PDF转Markdown、文档解析、OCR识别、识别图片文字、解析图片、提取文档内容。
metadata:
  openclaw:
    requires:
      bins:
        - ppx
    homepage: https://github.com/memect/memect-ppx
---

# memect-ppx

Use the local `ppx` CLI to parse PDFs and images into structured Markdown and JSON.

## Runtime Requirements

- Use Python `>= 3.12`.
- Prefer installing PPX into a virtual environment instead of the system Python.
- If `ppx` is missing, read `references/troubleshooting.md` and create a virtual environment before installing dependencies.
- Keep this skill's frontmatter `version` synchronized from the repository `pyproject.toml` with `scripts/sync_version.py`.

## Workflow

1. Confirm the runtime uses Python `>= 3.12`.
2. Check the runtime with `scripts/check_ppx_env.sh`.
3. If `ppx` is missing, create or use a virtual environment and install PPX there.
4. Choose parsing options:
   - Use `--ocr auto` by default.
   - Use `--ocr yes` for scanned PDFs or screenshots.
   - Use `--ocr no` for native PDFs when OCR causes noise.
   - Use `--table auto` by default.
   - Use `--table llm` only when the user needs highest table accuracy and an LLM backend is configured.
5. Run `ppx parse <input> -o <output>`.
6. Inspect the output folder and report the main artifacts:
   - `doc.md`
   - `doc.json`
   - `pages/`
   - `images/` when figures are extracted
7. If parsing fails, summarize the failing step and load the relevant note from `references/`.

## Common Commands

```bash
ppx parse report.pdf -o output/
ppx parse scan.pdf --ocr yes -o output/
ppx parse figure.png -o output/
ppx parse report.pdf --pages "1-5,10" -o output/
ppx parse report.pdf --table llm --backend deepseek -o output/
```

## Output Contract

- Prefer returning the absolute output directory.
- Mention whether the result came from `doc.md`, `doc.json`, or page-level files.
- Call out OCR mode, table mode, and backend when they materially affect accuracy.

## References

- Read `references/cli-options.md` when choosing parse flags.
- Read `references/backend-config.md` when using DeepSeek, Paddle, or GLM backends.
- Read `references/troubleshooting.md` when PPX is missing, Python is too old, or runtime dependencies fail.

_meta.json

{
  "ownerId": "kn7bp35421dmza76vk1621mnan81syam",
  "slug": "memect-ppx",
  "version": "0.2.6",
  "publishedAt": 1778816917678
}

references/backend-config.md

# Backend Config

Only use an LLM backend when the user asks for higher accuracy on complex layouts or tables.

## Backend Selection

- `default`: Local default pipeline, best for privacy and CI.
- `deepseek`: Best for complex layouts when a local vLLM endpoint is available.
- `paddle`: Strong accuracy with lower GPU requirements.
- `glm`: Faster OCR-style inference on compatible deployments.

## Examples

```bash
ppx parse report.pdf --backend deepseek \
  --deepseek '{"base_url":"http://127.0.0.1:4000/v1","model":"deepseek-ocr-2","api_key":""}'

ppx parse report.pdf --backend paddle \
  --paddle '{"base_url":"http://127.0.0.1:4001/v1","model":"paddleocr-vl","api_key":""}'

ppx parse report.pdf --backend glm \
  --glm '{"base_url":"http://127.0.0.1:4002/v1","model":"glmocr","api_key":""}'
```

## Persistent Settings

Use `--set` to avoid repeating backend config:

```bash
ppx parse report.pdf --set backend="deepseek" \
  --set deepseek.base_url="http://127.0.0.1:4000/v1"
```

If backend parsing fails, fall back to the default pipeline unless the user explicitly requires the backend path.

references/cli-options.md

# CLI Options

Use these defaults unless the user requests something more specific.

## Input Selection

- `ppx parse <file> -o <dir>`: Parse one PDF or image.
- `ppx parse <dir> -o <dir>`: Batch-parse a directory.
- `--pages "1-5,10,15-20"`: Restrict parsing to selected pages.

## OCR

- `--ocr auto`: Default. Works for mixed native/scanned documents.
- `--ocr yes`: Force OCR for scanned PDFs and raster-heavy pages.
- `--ocr no`: Skip OCR for native PDFs with selectable text.

## Tables

- `--table auto`: Default.
- `--table wbk`: White-background tables in ordinary documents.
- `--table ybk`: Colored or dark-background tables.
- `--table llm`: Highest table fidelity when an LLM backend is configured.
- `--table no`: Skip table extraction.

## Other Useful Flags

- `--mode page|tree|ppt`: Select parse mode. Use `page` unless a different downstream structure is required.
- `--workers N`: Parallelize directory parsing.
- `--html`: Emit `doc.html` in the output directory for HTML preview/export.
- `--json`: Emit JSON-focused output.
- `--cpu`: Force CPU mode.
- `--debug` or `-x`: Keep extra debug output.
- `--dev`: Save intermediate results for investigation.

references/troubleshooting.md

# Troubleshooting

## Python Version

- Require Python `>= 3.12`.
- Check the active interpreter with:

```bash
python3 --version
```

- If the system default is older than 3.12, create the virtual environment with an explicit interpreter such as `python3.12`.

## Recommended Environment

- Prefer a dedicated virtual environment for PPX.
- Example setup:

```bash
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install memect-ppx
pip install onnxruntime
pip install opencv-contrib-python
```

- If `python3.12` is unavailable, use any Python interpreter version `>= 3.12`.

## `ppx` Not Found

- Install the CLI:

```bash
source .venv/bin/activate
pip install memect-ppx
pip install onnxruntime
pip install opencv-contrib-python
```

- On headless Linux, prefer:

```bash
pip install opencv-python-headless
```

## Common Runtime Issues

- `ImportError: libGL.so.1`
  Install `opencv-python-headless` or the system `libgl1` package.

- `onnxruntime` and `onnxruntime-gpu` conflict
  Keep only one of them installed in the active environment.

- CUDA backend not available on macOS
  Use CPU mode or a remote/local service backend instead.

## Output Validation

After a successful parse, verify that the output directory contains:

- `doc.md`
- `doc.json`
- `pages/`

If one of these is missing, treat the run as partial and report that explicitly.

Sponsored

Ads related to Memect Ppx and adjacent AI workflows.