feat: add rich ui for converting
This commit is contained in:
+23
-3
@@ -157,26 +157,46 @@ Convert papers from PDF to Markdown using MinerU.
|
||||
**Options:**
|
||||
- `--library PATH`: Specify library directory
|
||||
- `--paper-id ID`: Convert specific paper only
|
||||
- `--retry-failed`: Retry papers with failed conversion status
|
||||
- `--force`: Force reconvert all papers (including successful ones)
|
||||
- `--no-ui`: Disable rich UI display (useful for scripting)
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# Convert all pending papers
|
||||
# Convert all pending papers (with rich UI)
|
||||
paperlib convert
|
||||
|
||||
# Retry failed conversions
|
||||
paperlib convert --retry-failed
|
||||
|
||||
# Force reconvert all papers
|
||||
paperlib convert --force
|
||||
|
||||
# Convert specific paper
|
||||
paperlib convert --paper-id arxiv-2212_06340
|
||||
|
||||
# Convert without UI (for scripts)
|
||||
paperlib convert --no-ui
|
||||
|
||||
# Convert in specific library
|
||||
paperlib convert --library ~/research
|
||||
```
|
||||
|
||||
**Behavior:**
|
||||
- Processes papers with `conversion_status: pending`
|
||||
- Uses MinerU for PDF to Markdown conversion
|
||||
- Processes papers with `conversion_status: pending` (or failed with `--retry-failed`)
|
||||
- Uses MinerU for PDF to Markdown conversion with CPU pipeline backend
|
||||
- Shows rich UI with progress bar and live MinerU output (unless `--no-ui`)
|
||||
- Updates metadata with conversion status
|
||||
- Creates conversion logs in `logs/` directory
|
||||
- Post-processes markdown to fix image references (`images/` → `assets/`)
|
||||
- Handles conversion failures gracefully
|
||||
|
||||
**Rich UI Features:**
|
||||
- Progress bar showing papers converted
|
||||
- Live streaming of MinerU output
|
||||
- Current paper being processed
|
||||
- Color-coded output (errors in red, progress in blue, etc.)
|
||||
|
||||
---
|
||||
|
||||
### `paperlib reindex`
|
||||
|
||||
Reference in New Issue
Block a user