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")--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)
Examples
Process specific pages with custom width:
llama-scan document.pdf --start 1 --end 5 --width 1000
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.4.tar.gz
(6.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.4.tar.gz.
File metadata
- Download URL: llama_scan-0.1.4.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5114144edc254e9f850f38b09dc9917312ebf0796fcf837d6d032976d746bf3
|
|
| MD5 |
67cf01ed92356fb98777b44a972d5a7f
|
|
| BLAKE2b-256 |
9bd6c8bdae6a23db6771545a98a6dd3da6a4d53e9d9cf9a28cf45021bff3bf06
|
File details
Details for the file llama_scan-0.1.4-py3-none-any.whl.
File metadata
- Download URL: llama_scan-0.1.4-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5390d7ea909754110b1f9d60c9cdd0be0a87631a2ffb95eda4feaaf56b910d5
|
|
| MD5 |
d3c8f9f2cf3719e647de38c12f61f9f8
|
|
| BLAKE2b-256 |
287a8dda71a780f84eebec48cc41fcfd2f6311a6e92503c850e92e4295d22de4
|