Skip to content

stony2k/rezepti

 
 

Repository files navigation

Rezepti (Apple Notes & Gemini Fork)

Rezepte aus dem Netz — direkt nach Apple Notizen & Notion.

Danksagung: Dieses Projekt ist ein Fork des fantastischen Rezepti von @keno303. Vielen Dank für die großartige Vorarbeit und die geniale Idee!

Rezepti ist ein Webservice, der Rezepte aus URLs extrahiert und als strukturierte Seiten in deinen Notizen speichert. Einfach einen Link einfügen — von YouTube, Instagram, TikTok oder einer beliebigen Webseite — und Rezepti erledigt den Rest.

✨ Was ist neu in diesem Fork?

Die Hauptfokuspunkte dieses Forks liegen auf einer nahtlosen Integration in macOS und der Unterstützung von schnellen Cloud-LLMs als Alternative zu lokalen Modellen:

  1. Apple Notizen Export: Rezepte werden direkt strukturiert in Apple Notizen unter macOS gespeichert – ideal zur Organisation.
  2. Gemini API Unterstützung: Neben lokalen Ollama-Modellen kann nun auch die Google Gemini API verwendet werden. Das Free-Tier reicht völlig aus und ist extrem schnell.
  3. Bilder-Workflow (16:9): Integrierter Bild-Zuschneider. Nach dem Export kann das Bild per Klick kopiert und manuell in die Notiz eingefügt werden (AppleScript Limitation Bypass).
  4. Automatisches Whisper-Setup: Rezepti nutzt whisper-cpp für die lokale Transkription von Videos. Beim ersten Start wird das benötigte Modell (large-v3-turbo) automatisch geprüft und ggf. heruntergeladen.
  5. Smarter Video-Workflow: Um Halluzinationen zu vermeiden, werden YouTube/TikTok/Reels zwingend transkribiert, falls keine Untertitel vorhanden sind. Die Erkennung ist nun robuster und nutzt bevorzugt deutsche Original-Untertitel, selbst wenn der Download für andere Sprachen fehlschlägt.
  6. Detaillierte Echtzeit-Fortschrittsanzeige: Die WebUI zeigt einen globalen Fortschrittsbalken sowie sekundengenaue Prozentangaben für Downloads (yt-dlp) und die Whisper-Transkription an.
  7. Automatisierte Installation: Rezepti prüft beim Start alle System-Abhängigkeiten (ffmpeg, yt-dlp, whisper-cpp). Auf einem Mac mit installiertem Homebrew werden fehlende Werkzeuge vollautomatisch nachinstalliert!
  8. Clean Terminal & Debug-Modus: Die Standard-Konsolenausgabe ist nun minimalistisch und übersichtlich. Über DEBUG=true in der .env können detaillierte Logs (Live-KI-Generierung, Whisper-Transkript, Prompts) aktiviert werden.
  9. Gemini Audio-Native Extraktion: Falls lokales Whisper nicht verfügbar oder deaktiviert ist, nutzt Rezepti die nativen Audio-Fähigkeiten von Gemini 1.5, um das Rezept direkt aus der Audiospur zu hören. Ein Download wird zudem sofort abgebrochen, falls weder Whisper noch ein fähiges LLM zur Verfügung stehen.

⚙️ Funktionsweise

URL / Datei  →  Klassifizierung  →  Inhalte abrufen  →  Rezept extrahieren  →  Apple Notes / Notion

Extraktionspfade

  1. schema.org/Recipe | JSON-LD-Parsing (schnellster Pfad, nur Web)
  2. Text → LLM | Untertitel, Seitentext oder Beschreibung an Gemini/Ollama
  3. Audio → Whisper / Gemini 1.5 → LLM | Audio lokal transkribieren oder direkt von Gemini analysieren lassen.
  4. Bild → Vision-LLM | Bild mit Vision-Modell analysieren (Fallback) (Unterstützte Quellen: YouTube, Instagram, TikTok, beliebige Web-Rezepte, lokale Bild- & PDF-Dateien)

🛠 Voraussetzungen

  • Node.js (v20+)
  • macOS (zwingend erforderlich für den Apple Notizen-Export via AppleScript)
  • ffmpeg (wird automatisch via Homebrew installiert)
  • yt-dlp (wird automatisch via Homebrew installiert)
  • whisper-cpp (wird automatisch via Homebrew installiert)
  • Homebrew (Empfohlen für die automatische Installation aller Werkzeuge)
  • Optional: Ein Google Gemini API-Key oder Ollama
  • Optional: Ein Notion-Integration-Token

🚀 Installation & Handhabung

Klone dein Repository (Passe die URL an, falls du ihn bereits in deinem Account hast):

git clone https://github.com/keno303/rezepti.git
cd rezepti
npm install

Konfiguration

Kopiere die Beispiel-Umgebungsdatei:

cp .env.example .env

(Hinweis: Die .env Datei wird durch .gitignore automatisch von Github ausgeschlossen, sodass private Keys sicher auf deinem Mac bleiben!)

Bearbeite nun die .env. Du kannst hier festlegen, welchen LLM-Provider du verwenden willst (gemini oder ollama) und wohin exportiert werden soll: (Tipp: Wenn du Ollama verwendest, prüft Rezepti beim Start automatisch, ob die in der .env konfigurierten Modelle lokal vorhanden sind und lädt sie bei Bedarf selbstständig herunter!)

# Provider-Wahl
LLM_PROVIDER=gemini
GEMINI_API_KEY=dein_api_key

# Export-Optionen
EXPORT_OPTIONS=notion, apple-notes
APPLE_NOTES_FOLDER=Rezepte

# Whisper & Debugging
WHISPER_ENABLED=true
DEBUG=false

Starten

Entwicklungsmodus starten:

npm run dev

Öffne anschließend im Browser http://localhost:3000. Sobald ein Rezept erfolgreich extrahiert wurde, findest du im Web-Interface das auf 16:9 zugeschnittene Titelbild und einen "Kopieren"-Button. Da Bilder per Skript nicht fehlerfrei an Apple Notes gesendet werden können, klickst du das Bild einfach an, um es in die Zwischenablage zu kopieren.

Wichtig für Apple Notizen: Damit der Titel deiner Notiz nicht verloren geht, wechsele zu Apple Notes und füge das kopierte Bild mit Cmd + V direkt unter den Metadaten (den Hashtags/Pills) ein, nicht ganz oben!

Bild in Apple Notizen einfügen

Bild Kopieren im Web-Interface

💻 Tech-Stack

📄 Lizenz

MIT


English Version

Rezepti (Apple Notes & Gemini Fork)

Extract recipes from the web — straight to Apple Notes & Notion.

Acknowledgments: This project is a fork of the fantastic Rezepti by @keno303. Huge thanks for the great foundation and the brilliant idea!

Rezepti is a self-hosted web service that extracts recipes from URLs and saves them as structured pages. Just paste a link — from YouTube, Instagram, TikTok, or any website — and Rezepti does the rest.

✨ What's new in this fork?

This fork focuses on macOS compatibility and faster cloud LLM extraction functionality in addition to local models:

  1. Apple Notes Export: Save recipes directly formatted to Apple Notes on macOS.
  2. Gemini API Support: Fast extraction using Google's Gemini API (Free tier is usually sufficient).
  3. 16:9 Image Workflow: Built-in image cropper to bypass AppleScript image insertion restrictions.
  4. Whisper Automation: Local transcription via whisper-cpp. The large-v3-turbo model is automatically verified and downloaded on first run.
  5. Smart Video Workflow: YouTube, TikTok, and Reels are transcribed by default if subtitles are missing. The logic is now more robust, prioritizing original subtitles even if partial download errors occur.
  6. Real-time Progress UI: The Web UI features a global progress bar plus granular percentage displays for downloads (yt-dlp) and Whisper transcription, providing instant feedback on long-running tasks.
  7. Automated Setup: On startup, Rezepti checks for all system dependencies (ffmpeg, yt-dlp, whisper-cpp). On macOS with Homebrew installed, missing tools are automatically installed!
  8. Clean Terminal & Debug Mode: Standard console output is now clean and focused. Activate DEBUG=true in .env for detailed live logs of transcripts, KI generation, and prompts.
  9. Gemini Native Audio Support: If local Whisper is missing or disabled, Rezepti utilizes Gemini 1.5's native audio-to-text capabilities to extract the recipe directly from the sound. Downloads are aborted immediately if no transcription tools are available.

⚙️ How It Works

URL / File  →  Classify  →  Fetch content  →  Extract recipe  →  Apple Notes / Notion

Extraction Paths

  1. schema.org/Recipe | JSON-LD parsing (fastest path, web only)
  2. Text → LLM | Subtitles, page text, or description via Gemini/Ollama
  3. Audio → Whisper / Gemini 1.5 → LLM | Transcribe audio locally or let Gemini analyze the sound directly.
  4. Image → Vision LLM | Analyze image with vision model (fallback) (Supported Sources: YouTube, Instagram, TikTok, any recipe website, local image & PDF files)

🛠 Prerequisites

  • Node.js (v20+)
  • macOS (Required for the Apple Notes export via AppleScript)
  • ffmpeg (auto-installed via Homebrew)
  • yt-dlp (auto-installed via Homebrew)
  • whisper-cpp (auto-installed via Homebrew)
  • Homebrew (Recommended for automatic tool installation)
  • Optional: A Google Gemini API Key or Ollama
  • Optional: A Notion integration token

🚀 Installation & Usage

Clone the repository (Adjust the URL if you pushed it to your own remote):

git clone https://github.com/keno303/rezepti.git
cd rezepti
npm install

Configuration

Copy the example environment file:

cp .env.example .env

(Note: The .env file is safely ignored by git thanks to .gitignore, keeping your private tokens securely on your machine!)

Edit .env to select your LLM provider (gemini or ollama) and configure your export destinations: (Tip: If you use Ollama, Rezepti automatically checks on startup if the models configured in .env are available locally and pulls them for you if needed!)

# Provider choice
LLM_PROVIDER=gemini
GEMINI_API_KEY=your_api_key

# Export Options
EXPORT_OPTIONS=notion, apple-notes
APPLE_NOTES_FOLDER=Recipes

# Whisper & Debugging
WHISPER_ENABLED=true
DEBUG=false

Start

Start the dev server:

npm run dev

Then open http://localhost:3000 in your browser. Once a recipe is extracted, the web UI will present a cropped 16:9 cover image with a handy copy button. Since AppleScript can't directly inject the image reliably, just click to copy it to your clipboard.

Important for Apple Notes: To prevent losing the title of your newly created note, switch to Apple Notes and paste (Cmd + V) the image directly below the metadata (hashtags/pills), not at the very top!

Pasting image in Apple Notes

Copying image in the Web UI

💻 Tech Stack

📄 License

MIT

About

TypeScript webSelf-hosted recipe extraction tool. Paste a link from TikTok, Reels or any website to get a structured recipe. Now featuring direct Apple Notes export, 16:9 image crop, and Google Gemini LLM integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 67.3%
  • HTML 32.7%