Commit Graph

8 Commits

Author SHA1 Message Date
jbrechtel 506de6c4d8 Uses latest sonnet model
Build and Deploy / build-and-deploy (push) Successful in 1m46s
2026-05-31 14:48:32 -04:00
jbrechtel 2dd8840569 fix: resolve prompts dir in Docker and script, try multiple locations
Build and Deploy / build-and-deploy (push) Successful in 1m34s
2026-05-21 12:58:52 -04:00
jbrechtel c015dce51e fix: strip code fences, add MIME/size validation, add tests 2026-05-21 10:23:25 -04:00
jbrechtel 7a3f63e377 feat: add convert-to-cooklang script for Anthropic API recipe conversion 2026-05-21 10:18:23 -04:00
jbrechtel ddb8577c4b feat: add headless Chromium fallback to recipe scraper
Build and Deploy / build-and-deploy (push) Has been cancelled
Uses Playwright to drive Chromium when the primary requests-based
fetch fails (e.g., Cloudflare, JS-required pages). Hybrid approach:
try fast path first, fall back to Chromium only on failure.

Dockerfile: add playwright==1.52.0 pip package, run playwright
install-deps chromium + playwright install chromium to download
the browser and all system libraries.

scrape-recipe: add fetch_with_chromium() that tries Playwright
first, then chromium --headless --dump-dom as a subprocess fallback.
Modify main() to catch primary fetch errors and call Chromium
fallback before giving up.
2026-05-20 22:44:15 -04:00
jbrechtel baa3c2434f feat: add recipe scraping script and update Docker image
Build and Deploy / build-and-deploy (push) Successful in 1m55s
- scripts/scrape-recipe: Python script using recipe-scrapers to extract
  schema.org JSON-LD from a recipe URL (or local HTML file for testing)
- Dockerfile: add Python3 + recipe-scrapers in virtualenv, install the
  scrape-recipe script at /usr/local/bin/scrape-recipe
2026-05-19 23:07:53 -04:00
jbrechtel d52de3679e scripts/run: mount recipe directory and publish port
- scripts/run now takes a recipe directory as its first argument,
  resolves it to an absolute path, and mounts it at /recipes in the
  Docker container
- Parses --port flag to map container port 8080 to the requested
  host port (default 8080)
- Passes --recipe-dir /recipes --port 8080 to the server
- Passes --host and any additional args through to the server
- Exits with an error if the recipe directory doesn't exist
- Also accept --host flag and pass remaining args through

Example: ./scripts/run ~/my-recipes --port 9090
2026-05-19 07:29:04 -04:00
jbrechtel 9759a4c3a3 Add fourmolu + hlint with scripts and git hooks (Atlas-style)
- Create scripts/build, scripts/test, scripts/run, scripts/install-hooks
- Create git-hooks/pre-commit (auto-format staged .hs files)
- Create git-hooks/pre-push (check formatting + hlint before push)
- Handle git worktrees correctly in hook installation
- Run fourmolu on all source files to fix existing formatting
2026-05-18 22:24:59 -04:00