This project helps translating recipe books from PDF files into different languages and format (.md) using OCR and translation services (OpenRouter).
To install dependencies:
bun install- Setup your OpenRouter API key in the environment variable
OPENROUTER_API_KEY. - Put your PDF file into the
booksfolder. - Run the extraction script to extract text from the PDF using OCR:
bun run extract --input ./books/MyCookbook.pdf- Run the translation script to translate the extracted text and save it as a new PDF:
bun run translate --input "output/MyCookbook" --output ./translations/MyCook