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")--custom-instructions,-c: Optional path to a text file containing additional instructions (default: None)--keep-images,-k: Keep the intermediate image files (default: False)--width,-w: Width of the resized images (0 to skip resizing; default: 0)--start,-s: Start page number (default: 0)--end,-e: End page number (default: 0)--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.6.tar.gz
(7.5 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.6.tar.gz.
File metadata
- Download URL: llama_scan-0.1.6.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50f16dd40fd717629ca94d19dc3ddb9c7f6b2e2beab9595e86c7a3ee4f12eefc
|
|
| MD5 |
5ecfb52a2f71107f35ddc1644b491e23
|
|
| BLAKE2b-256 |
79a2b0105843442325e1d357a8bfc7c1b46b411d0742ee5ccbf7c701359f3e49
|
File details
Details for the file llama_scan-0.1.6-py3-none-any.whl.
File metadata
- Download URL: llama_scan-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e995beaae0abc05a172465caf2f142c8379e2cec6ce29ed4ad1dd767b00c65b
|
|
| MD5 |
0e0d3e23f678df97cce461e73b8c86b4
|
|
| BLAKE2b-256 |
10f002af95a142ecca11e9c955e3c2ff501a8a3eacd3830e319cb04886b34055
|