Skip to main content

Convert PDF recipes to .melarecipe format using Mistral OCR

Project description

pdf2mela

Convert scanned PDF recipes to Mela format using Mistral OCR.

  • Single PDF → .melarecipe (JSON)
  • Multiple PDFs → .melarecipes (ZIP)

Requirements

Installation

Install as tool with uv (recommended):

uv tool install pdf2mela

Or with pip:

pip install pdf2mela

Or run it directly without installing:

uvx pdf2mela --inputs recipe.pdf

Usage

# Single file
pdf2mela --inputs recipe.pdf

# Multiple files
pdf2mela --inputs recipe1.pdf recipe2.pdf

# Whole directory
pdf2mela --inputs ./scans/

# Custom output directory
pdf2mela --inputs ./scans/ --output ./mela/

# Explicit API key
pdf2mela --inputs recipe.pdf --api-key YOUR_KEY

The Mistral API key is read from the MISTRAL_API_KEY environment variable by default.

Pricing

Mistral OCR costs $2 per 1,000 pages. The tool prints an estimated cost at the end of each run, including what it would have cost with the 50% batch discount. See Mistral's pricing page for up-to-date rates.

Notes

  • Recipes are extracted in their original language — no translation is applied.
  • All PDFs in a run are processed concurrently.
  • Failed requests are retried up to 3 times with exponential backoff.
  • Set LOGLEVEL=DEBUG to see raw OCR responses.

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

pdf2mela-0.1.1.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

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

pdf2mela-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pdf2mela-0.1.1.tar.gz.

File metadata

  • Download URL: pdf2mela-0.1.1.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for pdf2mela-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dc048836e2840ebd4dfba0f80958e748fb2c86b8ea0b7aed9b128076977f8680
MD5 5f679c993f0fa0a4a73fd682d881c637
BLAKE2b-256 bd951627a857bdf16aa990e3a984e0bfa1f26ad1a0b583351900a852c416b2e8

See more details on using hashes here.

File details

Details for the file pdf2mela-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pdf2mela-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for pdf2mela-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ede691e443b1c22eea6231163588098ae6e709af784feb4ddb5872e8f9470999
MD5 a74c38586984d5610e6c02c55e155c4e
BLAKE2b-256 62f24115b09f724d3eab790c02f3668fea44b1bb4e17cbabe0897e43aa5e75a2

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