# Recipe Importer Docker container for importing recipes from Hungarian websites into [Mealie](https://mealie.io/) and [Tandoor Recipes](https://tandoor.dev/). **Problem**: Mealie's and Tandoor's built-in URL import cannot parse ingredients and instructions from Hungarian recipe sites like mindmegette.hu. **Solution**: This container provides a web UI that scrapes Hungarian recipe pages with site-specific parsers, lets you review and edit the extracted data, then pushes it to Mealie and/or Tandoor via their REST APIs. ## Architecture ``` ┌──────────────────────────────────────────────────────┐ │ recipe-importer container (:8000) │ │ │ │ Flask + Gunicorn │ │ ├── /settings → Configure Mealie & Tandoor │ │ ├── /import → Paste URL, scrape, review │ │ ├── /scrape → AJAX: parse recipe HTML │ │ ├── /send → AJAX: push to Mealie API │ │ ├── /send-tandoor → AJAX: push to Tandoor API │ │ ├── /tags → AJAX: list tags from both │ │ └── /health → Health check │ │ │ │ Modules: │ │ ├── app/config.py → JSON config persistence │ │ ├── app/scraper.py → Site-specific parsers │ │ ├── app/mealie.py → Mealie REST API client │ │ └── app/tandoor.py → Tandoor REST API client │ └───────────────────┬──────────────┬───────────────────┘ │ HTTP │ HTTP ▼ ▼ ┌──────────────┐ ┌───────────────┐ │ Mealie │ │ Tandoor │ │ POST /api/.. │ │ POST /api/.. │ │ PUT /api/.. │ │ PUT /api/.. │ └──────────────┘ └───────────────┘ ``` ## Supported Sites | Site | Ingredients | Instructions | Image | Tags | |------|:-----------:|:------------:|:-----:|:----:| | mindmegette.hu | Yes | Yes | Yes | Yes | | streetkitchen.hu | Yes (with groups) | Yes (ol/ul/paragraph) | Yes | Yes (from JSON-LD categories) | | nosalty.hu | Yes (with groups) | Yes (with section headers) | Yes | Yes | | *Other sites* | Fallback (schema.org JSON-LD) | Fallback (schema.org JSON-LD) | Yes (og:image) | Fallback (schema.org keywords) | ### Mindmegette.hu Parser Extracts data from the Angular-rendered HTML: - **Title**: `og:title` meta tag, with ` | Mindmegette.hu` suffix stripped - **Description**: `og:description` meta tag - **Image**: `og:image` meta tag - **Ingredients**: `div.ingredients` → `div.ingredients-meta` rows, each containing `` (qty), `` (unit), `` (food), `` (extra) - **Ingredient groups**: Multiple `div.ingredients` containers; group title via `` - **Instructions**: `mindmegette-wysiwyg-box` → `ol > li` elements - **Tags**: `` elements inside `div.desktop-wrapper` ### Streetkitchen.hu Parser Extracts data from the Next.js-rendered HTML: - **Title**: `og:title` meta tag, with ` | Street Kitchen` suffix stripped - **Description**: `og:description` meta tag - **Image**: `og:image` meta tag (CDN URL) - **Ingredients**: `div.grid.grid-cols-1` container → `div.my-2.flex` rows; quantity+unit merged in first `
` (split via regex), food in `
`, optional extra in parenthesised `
` - **Ingredient groups**: `
` headers inside section divs (e.g. "Az előfőzéshez", "A sütéshez") - **Instructions**: Three formats handled — `
    ` ordered list, `