21a4cea083
- Add Roux.NYTimes module with:
- extractNextData: finds <script id="__NEXT_DATA__"> tag in HTML
and parses its JSON content via aeson
- parseNYTRecipe: maps NYTimes recipe JSON structure into a
typed intermediate representation (NYTRecipe, NYTIngredientGroup,
NYTIngredientItem, NYTStepGroup, NYTStepItem)
- Supports all NYTimes Cooking data: title, URL, total time, yield,
topnote, ingredient groups (with section names), step groups
- Add aeson to dependencies
- Add 4 tests: extraction + parsing for both fried-rice and
carrot-risotto example HTML files
- Wire NYTimesSpec into test runner
81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
name: roux-server
|
|
version: 0.1.0
|
|
synopsis: Personal/family recipe management site
|
|
description: A low-friction recipe manager using Cooklang files,
|
|
with cook history tracking and search.
|
|
author: James Brechtel
|
|
maintainer: james@flipstone.com
|
|
copyright: 2026 James Brechtel
|
|
license: BSD-3-Clause
|
|
|
|
default-extensions:
|
|
- DerivingStrategies
|
|
- LambdaCase
|
|
- OverloadedStrings
|
|
- TupleSections
|
|
|
|
ghc-options:
|
|
- -Wall
|
|
- -Werror
|
|
- -Wcompat
|
|
- -Widentities
|
|
- -Wincomplete-record-updates
|
|
- -Wincomplete-uni-patterns
|
|
- -Wmissing-export-lists
|
|
- -Wmissing-home-modules
|
|
- -Wpartial-fields
|
|
- -Wredundant-constraints
|
|
|
|
dependencies:
|
|
- base >= 4.7 && < 5
|
|
- aeson
|
|
- blaze-html
|
|
- blaze-markup
|
|
- bytestring
|
|
- containers
|
|
- directory
|
|
- filepath
|
|
- http-types
|
|
- optparse-applicative
|
|
- parsec
|
|
- text
|
|
- time
|
|
- wai
|
|
- warp
|
|
|
|
library:
|
|
source-dirs: src
|
|
|
|
executables:
|
|
roux-server:
|
|
main: Main.hs
|
|
source-dirs: app
|
|
ghc-options:
|
|
- -threaded
|
|
- -rtsopts
|
|
- -with-rtsopts=-N
|
|
dependencies:
|
|
- optparse-applicative
|
|
- roux-server
|
|
- unix
|
|
check-recipes:
|
|
main: Main.hs
|
|
source-dirs: app/check-recipes
|
|
dependencies:
|
|
- directory
|
|
- filepath
|
|
- roux-server
|
|
- text
|
|
|
|
tests:
|
|
roux-server-test:
|
|
main: Spec.hs
|
|
source-dirs: test
|
|
dependencies:
|
|
- hspec
|
|
- roux-server
|
|
- tasty
|
|
- tasty-golden
|
|
- tasty-hspec
|
|
- tasty-hunit
|