Skip to main content

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

  1. Install Ollama
  2. Pull the default model:
ollama run qwen2.5vl:latest

Installation

Install using pip:

pip install "git+ssh://git@github.com/ngafar/llama-scan.git"

or uv:

uv tool install https://github.com/ngafar/llama-scan.git

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.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_scan-0.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_scan-0.1.3.tar.gz.

File metadata

  • Download URL: llama_scan-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for llama_scan-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e9d28148057465716e8296d56dd8fe2f9c78211c77d395bedd0b5e94088756a9
MD5 3b920ec001567fbe83d1297fcfef9c68
BLAKE2b-256 bbfe873331a4ff365eb98afc658cbfba5ea573bc2b4cd3ab2f3a06444cb5ef81

See more details on using hashes here.

File details

Details for the file llama_scan-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: llama_scan-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for llama_scan-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1994c44db5047b936bd3892bc5aed05ef328e3db0dad3e4b615c6f0d88d6326a
MD5 e7cb2e5e08a467e49eb99acd0a4e57f0
BLAKE2b-256 6f206b2715efe50c58b9c90128545c351a2e65598b44cf0f4acb02b9a2f1e772

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page