Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,35 @@ python3 run_pageindex.py --pdf_path /path/to/your/document.pdf
You can customize the processing with additional optional arguments:

```
--model LLM model to use (default: gpt-4o-2024-11-20)
--toc-check-pages Pages to check for table of contents (default: 20)
--max-pages-per-node Max pages per node (default: 10)
--max-tokens-per-node Max tokens per node (default: 20000)
--if-add-node-id Add node ID (yes/no, default: yes)
--if-add-node-summary Add node summary (yes/no, default: yes)
--if-add-doc-description Add doc description (yes/no, default: yes)
--model LLM model to use (default: gpt-4o-2024-11-20)
Supports any LiteLLM provider prefix, e.g.:
anthropic/claude-sonnet-4-6
gemini/gemini-2.0-flash
--toc-check-pages Pages to check for table of contents (default: 20)
--max-pages-per-node Max pages per node (default: 10)
--max-tokens-per-node Max tokens per node (default: 20000)
--if-add-node-id Add node ID (yes/no, default: yes)
--if-add-node-summary Add node summary (yes/no, default: yes)
--if-add-doc-description Add doc description (yes/no, default: no)
--output-format Output format: "json" (default) or "markdown"
"markdown" writes a human-readable outline with
headings and summaries instead of raw JSON.
--output-dir Directory to write the output file (default: ./results)
--verbose Enable verbose logging (LiteLLM requests, retries,
token counts)
```

**Examples:**

```bash
# Use Anthropic Claude instead of OpenAI
python3 run_pageindex.py --pdf_path report.pdf --model anthropic/claude-sonnet-4-6

# Export a human-readable Markdown outline instead of JSON
python3 run_pageindex.py --pdf_path report.pdf --output-format markdown

# Save results to a custom directory with verbose logging
python3 run_pageindex.py --pdf_path report.pdf --output-dir ./my_results --verbose
```
</details>

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pymupdf==1.26.4
PyPDF2==3.0.1
python-dotenv==1.1.0
pyyaml==6.0.2
tqdm>=4.66.0 # optional: progress bars in run_pageindex.py (--output-format markdown)
Loading