---
id: QuZhan51496/paper2anything/paper2html
version: "c351cec0"
license: Apache-2.0
install: manual
updated: 2026-07-16
---
# Paper2html — Paper2html transforms academic papers into standalone project websites you can deploy immediately. You lead the design process—scripts handle PDF parsing and fact extraction, while you read the material, choose a design language, and hand-author the HTML. The skill validates your work against the extracted content to catch missing figures and broken links.
Publisher: QuZhan51496 · Stars: 304 · Updated: 2026-07-16
Install (manual): `git clone https://github.com/QuZhan51496/paper2anything`
## SKILL.md
# paper2html — Paper to single-page project homepage (you-led, coordinated)
Turn a paper PDF into a **self-contained, publish-ready single-page project website** — the kind of paper
homepage researchers commonly build on GitHub Pages.
**You are the lead author**: this file is the recipe, not a fully automated script — there is no `main.py`,
no renderer. The mechanical steps (parse / extract / QA) call the small tools under `scripts/`; **understanding
the paper, designing the page, and writing `index.html` are done by you** (read the material and figures with
Read, write `index.html` with Write), confirming with the user at key points via `AskUserQuestion`.
```text
PDF
→ parse + extract (parse_pdf.py: MinerU → clean.md + manifest.json + images/, gate 1)
→ you understand it + set the design (read manifest + clean.md + look at figures) → pick a design language [confirm design direction]
→ you hand-author the page (per the references/ design-language and authoring rules) → index.html [optional confirm]
→ QA validation (validate.py: missing figures/broken links/content fidelity, gate 2) → fix per report, loop
→ single-page project homepage index.html (+ images/, deployable as-is)
```
## How you run this skill
1. **Step by step**: run scripts for the mechanical steps via `Bash` (absolute paths, no cd needed); do the design and authoring yourself with `Read`/`Write`.
2. **Compute `WORKDIR` inline at the top of each Bash block** (each Bash call is a separate shell and does not share variables):
```bash
WORKDIR="$(dirname "$pdf_path")/.paper2anything/html/$(basename "${pdf_path%.*}")"
```
`$pdf_path` is the paper PDF the user gave (reset it in each block). The scripts live in `${SKILL_DIR}/scripts` — `SKILL_DIR`
is **this skill's directory** (see "Base directory for this skill: …" injected at the top of this skill); each Bash block is a
separate shell, so in the blocks that use it `export SKILL_DIR=` once at the top (set it inline each time, like `WORKDIR`).
3. **Pause at decision points with `AskUserQuestion`**: after understanding the paper, confirm the **design direction** (design language / primary color / emphasis); after the draft is done, you may confirm again.
4. **Faithful to the manifest, you fill the gaps**: use only the real material in `manifest.json`, don't fabricate numbers/authors/links; fields the manifest left empty
(authors/abstract/links etc.) you complete from the full text of `clean.md` — you are the lead author, deterministic extraction is only scaffolding.
---
## Step 0: Environment and credentials
> **Unified environment**: all `python` commands run in paper2anything's unified conda environment (top-level `environment.yml`),
> prefixed with `conda run -n paper2anything --no-capture-output`.
Credentials are centralized in the package-root `.env` (copied from `.env.example`, already gitignored); export it once per new shell:
```bash
set -a; source /.env; set +a
```
This skill **only needs `MINERU_API_TOKEN`** (to parse the PDF). **Page design and authoring are done by you, calling no LLM API**,
so no OPENAI/LLM key is needed.
Dependency self-check:
```bash
conda run -n paper2anything --no-capture-output python -c "import requests, rich, dotenv, playwright, PIL" 2>&1
# render_check.py (Step 4 render self-check) needs the chromium engine; install it once before the first run:
# conda run -n paper2anything --no-capture-output python -m playwright install chromium
```
---
## Step 1: Parse + deterministic extraction (script, gate 1)
```bash
pdf_path="/path/to/paper.pdf" # ← the user's paper PDF
WORKDIR="$(dirname "$pdf_path")/.paper2anything/html/$(basename "${pdf_path%.*}")"
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/parse_pdf.py" "$pdf_path" --workdir "$WORKDIR"
```
Outputs (under `$WORKDIR`):
- `clean.md` — normalized full-text markdown (for you to read through)
- `manifest.json` — deterministically extracted facts: title/authors/affiliations/abstract/links/claims/figures/tables/
method_components/bibtex (appendix filtered; fields that couldn't be extracted are left empty for you to fill)
- `images/` — the figure files the page references (figures + result-table screenshots), referenced by you as `images/`
- `parsed/` (MinerU raw parse, includes full.md for reuse on re-run), `logs/`
Optional: when you know the paper's canonical link, add `--paper-url ` (**no arxiv assumption**; if omitted, `links.paper` stays empty); `--code-url` likewise.
After parsing, `Read` `manifest.json` and `clean.md` to read the full text.
---
## Step 2: Understand the paper + set the design direction (you do this) [confirm]
1. `Read` `manifest.json` (verified material) + `clean.md` (full text); `Read` the key figures under `images/` and judge **with your own eyes** which
one works as the hero, which suit inlining, and which are result-table screenshots.
2. Read `references/design-languages.md` and **establish a design concept** for this paper (pick one design language or blend: magazine/product page/
terminal/poster/minimal/dashboard; set the primary color, structure, what element leads). Different papers should look different — don't reuse the previous one's style.
3. Use `AskUserQuestion` to confirm the **design direction** with the user (design language / primary color / what to emphasize). Author the page with the confirmation in hand.
Fill the gaps: if the manifest's authors/abstract/links are empty, complete them yourself from the full text of `clean.md` (this is your backstop).
---
## Step 3: Hand-author index.html (you do this) [optional confirm]
Per the confirmed design direction, **author `$WORKDIR/index.html` yourself with `Write`** — a self-contained, deployable single-page website.
**First read `references/html-authoring.md`** (hard constraints and pitfalls). Key points:
- Self-contained: reference images with the relative path `images/` (from the manifest's `figures[].file` / `tables[].image`, which parse_pdf already copied into
`images/`); inline CSS or use a CDN; every `
` has a non-empty `alt`; leave no `href="#"`.
- Light first screen (title/authors/affiliations/resource buttons), the main figure as a one-time large teaser, then abstract → claims → method → results →
supporting figures → BibTeX (adjust to the paper's character, not mandatory).
- For result tables, **prefer screenshots** (`tables[].image`).
- **figure CSS: don't let the border frame whitespace, and never stretch the image to fill whitespace** (details in references/html-authoring.md).
- Faithful to the manifest, no fabrication; fill gaps from the full text.
After writing, you may use `AskUserQuestion` to show the user the design and structure (optional), and edit `index.html` directly per their feedback.
---
## Step 4: QA validation and revision (script, gate 2)
```bash
pdf_path="/path/to/paper.pdf"
WORKDIR="$(dirname "$pdf_path")/.paper2anything/html/$(basename "${pdf_path%.*}")"
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/validate.py" --workdir "$WORKDIR"
```
Validates the `index.html` you wrote → `validation.json` + `qa_report.md`. `Read` `qa_report.md`:
- **Errors must be cleared to zero** (missing doctype/`