feat: Add ingredient scaling and enable wild mode scraping #2

Merged
pkartch merged 1 commits from feature/ingredient-scaling into main 2025-10-30 05:37:34 +00:00
Owner

Summary

Adds ingredient scaling and wild mode scraping for Mealie parity.

Ingredient Scaling

  • Interactive servings control with +/- buttons
  • Real-time ingredient scaling
  • Handles fractions, decimals, ranges
  • Reset button included

Wild Mode Scraping

  • Upgraded to scrape_html() with supported_only=False
  • Works with ANY website (not just 541+ supported)
  • Tested with littlespoonfarm.com
  • Achieves parity with Mealie

Testing

Ingredient scaling with various formats
Wild mode with previously unsupported sites
UI responsiveness

🤖 Generated with Claude Code

## Summary Adds ingredient scaling and wild mode scraping for Mealie parity. ### Ingredient Scaling - Interactive servings control with +/- buttons - Real-time ingredient scaling - Handles fractions, decimals, ranges - Reset button included ### Wild Mode Scraping - Upgraded to scrape_html() with supported_only=False - Works with ANY website (not just 541+ supported) - Tested with littlespoonfarm.com - Achieves parity with Mealie ## Testing ✅ Ingredient scaling with various formats ✅ Wild mode with previously unsupported sites ✅ UI responsiveness 🤖 Generated with Claude Code
pkartch added 1 commit 2025-10-28 20:48:42 +00:00
feat: add ingredient scaling and enable wild mode scraping
Some checks failed
CI Pipeline / Lint Code (pull_request) Has been cancelled
CI Pipeline / Test API Package (pull_request) Has been cancelled
CI Pipeline / Test Web Package (pull_request) Has been cancelled
CI Pipeline / Test Shared Package (pull_request) Has been cancelled
CI Pipeline / Build All Packages (pull_request) Has been cancelled
CI Pipeline / Generate Coverage Report (pull_request) Has been cancelled
Docker Build & Deploy / Build Docker Images (pull_request) Has been cancelled
Docker Build & Deploy / Push Docker Images (pull_request) Has been cancelled
Docker Build & Deploy / Deploy to Staging (pull_request) Has been cancelled
Docker Build & Deploy / Deploy to Production (pull_request) Has been cancelled
E2E Tests / End-to-End Tests (pull_request) Has been cancelled
E2E Tests / E2E Tests (Mobile) (pull_request) Has been cancelled
Security Scanning / NPM Audit (pull_request) Has been cancelled
Security Scanning / Dependency License Check (pull_request) Has been cancelled
Security Scanning / Code Quality Scan (pull_request) Has been cancelled
Security Scanning / Docker Image Security (pull_request) Has been cancelled
Security Scanning / Security Summary (pull_request) Has been cancelled
5797dade02
## New Features

### 1. Ingredient Scaling Based on Servings
- Added interactive servings control with +/- buttons on recipe detail page
- Ingredients scale proportionally when servings are adjusted
- Smart parsing handles fractions (1/2, ¼), mixed numbers (1 1/2), decimals, and ranges
- Reset button to return to original servings
- Non-scalable ingredients (e.g., "to taste") are detected and displayed unchanged

**Files:**
- NEW: packages/web/src/utils/ingredientParser.ts - Ingredient parsing and scaling logic
- UPDATED: packages/web/src/pages/RecipeDetail.tsx - Added servings controls
- UPDATED: packages/web/src/App.css - Styled servings control buttons

### 2. Wild Mode Scraping (Parity with Mealie)
- Upgraded scraper to use `scrape_html()` with `supported_only=False`
- Now works with ANY website that has recipe schema, not just 541+ supported sites
- Matches Mealie's scraping capabilities
- Successfully tested with littlespoonfarm.com and other previously unsupported sites

**Changes:**
- Switch from `scrape_me()` to `scrape_html()` with wild mode enabled
- Added HTML fetching with proper user-agent headers
- Now supports thousands of recipe websites beyond the officially supported list

## Testing
 Ingredient scaling tested with fractions, decimals, ranges
 Wild mode tested with littlespoonfarm.com (previously unsupported)
 Verified parity with Mealie's scraping performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
pkartch merged commit 1f71e59d66 into main 2025-10-30 05:37:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pkartch/basil#2