Skip to content

Repository files navigation

TablePack

PDF tables → multi-sheet Excel packages you can actually accept

One command: drop in PDFs, get a review-ready Excel package · table-crop screenshots for QC · no MinerU tutorial required

Python 3.10+ License: MIT powered by MinerU Agent Skill GitHub stars

简体中文 · English (this page)

Quick start · Preview · Install · CLI · Agent skill · Docs

TablePack workflow: PDF tables → one command → Excel package

Why TablePack

MinerU is a strong parsing engine. But if all you want is "turn the tables in this paper / report into Excel", the last mile is steep: CLI flags, backend choices, content_list JSON, export formats. TablePack packs that last mile into one command — with reviewability built in:

  • One PDF → one Excel, one sheet per table
  • Table-crop screenshots saved next to every package — QC without extra tooling
  • Empty / broken tables → written into notes, never invented data
  • Ships with an agent skill: the same SOP for humans and agents

Quick start

git clone https://github.com/kujiangmudao/tablepack.git
cd tablepack
pip install -r requirements.txt

cp examples/demo/demo_sample.pdf pdf/
python -m pdf_excel          # then open output/demo_sample/

Prerequisite: MinerU already installed — installed is all you need; you never have to learn its CLI. No MinerU yet? Use the one-shot script in Install.

Preview

Table crop saved for QC    Packaged Excel sheet

Left: the crop screenshot saved for each table (for review) · Right: the packaged Excel sheet

Install

Path A — MinerU already installed

You only need this repo. TablePack finds mineru on PATH automatically (or reads mineru_bin from config.yaml).

git clone https://github.com/kujiangmudao/tablepack.git
cd tablepack
pip install -r requirements.txt
cp config.example.yaml config.yaml   # optional; only if mineru is not on PATH

Path B — No MinerU yet (one-shot install)

The script creates a project-local venv (.venv-mineru), installs official mineru[all] plus this project's deps, and writes config.yaml. It does not touch your global site-packages — after setup you only ever run TablePack, never the MinerU CLI by hand.

Windows (PowerShell)

git clone https://github.com/kujiangmudao/tablepack.git
cd tablepack
powershell -ExecutionPolicy Bypass -File scripts\install_mineru.ps1
.\.venv-mineru\Scripts\Activate.ps1
python -m pdf_excel --dry-config   # verify env & config

Linux / macOS

git clone https://github.com/kujiangmudao/tablepack.git
cd tablepack
chmod +x scripts/install_mineru.sh
./scripts/install_mineru.sh
source .venv-mineru/bin/activate
python -m pdf_excel --dry-config   # verify env & config

Then follow Quick start to run the demo. Full detail: docs/INSTALL.md.

CLI

I want to… Command
Convert every PDF in pdf/ python -m pdf_excel
Force re-convert and overwrite python -m pdf_excel --force
Only convert files not yet converted python -m pdf_excel --skip-existing
Only files whose name contains a keyword python -m pdf_excel keyword
Check environment & config python -m pdf_excel --dry-config

Each package folder contains the workbook (one sheet per table), table-crop screenshots for QC, extracted images, and notes (conversion notes, or an issues file when a table fails).

Folder/file names default to Chinese — set output_language: en in config.yaml to get English names (table_crops/, images/, conversion_notes.md, issues.md).

Inspect a sample package without running anything: examples/demo_output/demo_sample_en/

Agent skill

Works with OpenCode, Cursor, Claude Code, and any agent that can read a skill file.

Skill skills/pdf-table-to-excel/SKILL.md
Rules AGENTS.md
Invoke /pdf-table-to-excel · or just ask in plain language
  1. Prefer opening this repo as the workspace (CLI + skill together)
  2. Path B users: activate .venv-mineru so agents run in the same environment
  3. For visual QC (opening the table-crop images), a multimodal model works best

The skill handles both English and Chinese requests.

Drop into any agent (one raw URL):

https://raw.githubusercontent.com/kujiangmudao/tablepack/main/skills/pdf-table-to-excel/SKILL.md

Project layout

tablepack / pdf_excel
├── pdf_excel/                 # Python package (python -m pdf_excel)
├── skills/pdf-table-to-excel/ # agent skill
├── scripts/install_mineru.*   # Path B setup
├── examples/demo/             # synthetic demo PDF
├── docs/INSTALL.md
├── docs/assets/               # README screenshots & flow diagram
└── AGENTS.md

Docs

License & credits

MIT · Parsing engine: MinerU · Excel: openpyxl

You own final data correctness — verify against the source PDF before production use.

About

TablePack — One command turns PDF tables into review-ready Excel packages. Powered by MinerU; no MinerU tutorial needed.

Topics

Resources

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages