A tool for converting PDFs to text files using Ollama.
Project description
llama-scan
A tool for converting PDFs to text files using Ollama.
Features
- Convert PDFs to text files locally, no token costs.
- Use the latest multimodal models supported by Ollama.
- Turn images and diagrams into detailed text descriptions.
Requirements
- Python 3.10+
- Ollama installed and running locally
Installing Ollama and the Default Model
- Install Ollama
- Pull the default model:
ollama run qwen2.5vl:latest
Installation
Install using pip:
pip install llama-scan
or uv:
uv tool install llama-scan
Usage
Basic usage:
llama-scan path/to/your/file.pdf
Options
--output,-o: Output directory (default: "output")--model,-m: Ollama model to use (default: "qwen2.5vl:latest")--start,-s: Start page number (default: 0)--end,-e: End page number (default: 0)--custom-instructions,-c: Optional path to a text file containing additional instructions (default: None)--server-url,-u: Ollama server URL (default: "http://localhost:11434")--width,-w: Width of the resized images (0 to skip resizing; default: 0)--keep-images,-k: Keep the intermediate image files (default: False)--stdout,-s: Write merged output to stdout (default: False)
Examples
Process specific pages:
llama-scan document.pdf --start 1 --end 5
Use a different Ollama model:
llama-scan document.pdf --model qwen2.5vl:3b
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llama_scan-0.1.9.tar.gz
(25.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_scan-0.1.9.tar.gz.
File metadata
- Download URL: llama_scan-0.1.9.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bec14b7f1e7be0875d0376643e59938d2d7cd39fb1c185340f66a07dbdebe3d9
|
|
| MD5 |
65ffaa1ec08ae6727e4030ab798c4239
|
|
| BLAKE2b-256 |
a44441dc7ee32fa1368e7de80c18588b7422f0ea1945b6620bad5b9d192e17d6
|
File details
Details for the file llama_scan-0.1.9-py3-none-any.whl.
File metadata
- Download URL: llama_scan-0.1.9-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817d97a91dbfee1a42bfb36921b94c4d2b2d7fc5faf11913478711fb403e74ac
|
|
| MD5 |
13d74b8eb5dea72fd132619cf2769eff
|
|
| BLAKE2b-256 |
94973b2e4b015f016dfde02b8a271d9ca9fed0869970715152d9b8ea25cc1d82
|