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
163 lines
3.8 KiB
Plaintext
163 lines
3.8 KiB
Plaintext
cabal-version: 2.2
|
|
|
|
-- This file has been generated from package.yaml by hpack version 0.38.1.
|
|
--
|
|
-- see: https://github.com/sol/hpack
|
|
|
|
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
|
|
build-type: Simple
|
|
|
|
library
|
|
exposed-modules:
|
|
Roux
|
|
Roux.Html
|
|
Roux.NYTimes
|
|
Roux.Parser
|
|
Roux.RecipeIndex
|
|
Roux.Server
|
|
Roux.Types
|
|
other-modules:
|
|
Paths_roux_server
|
|
autogen-modules:
|
|
Paths_roux_server
|
|
hs-source-dirs:
|
|
src
|
|
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
|
|
build-depends:
|
|
aeson
|
|
, base >=4.7 && <5
|
|
, blaze-html
|
|
, blaze-markup
|
|
, bytestring
|
|
, containers
|
|
, directory
|
|
, filepath
|
|
, http-types
|
|
, optparse-applicative
|
|
, parsec
|
|
, text
|
|
, time
|
|
, wai
|
|
, warp
|
|
default-language: Haskell2010
|
|
|
|
executable check-recipes
|
|
main-is: Main.hs
|
|
other-modules:
|
|
Paths_roux_server
|
|
autogen-modules:
|
|
Paths_roux_server
|
|
hs-source-dirs:
|
|
app/check-recipes
|
|
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
|
|
build-depends:
|
|
aeson
|
|
, base >=4.7 && <5
|
|
, blaze-html
|
|
, blaze-markup
|
|
, bytestring
|
|
, containers
|
|
, directory
|
|
, filepath
|
|
, http-types
|
|
, optparse-applicative
|
|
, parsec
|
|
, roux-server
|
|
, text
|
|
, time
|
|
, wai
|
|
, warp
|
|
default-language: Haskell2010
|
|
|
|
executable roux-server
|
|
main-is: Main.hs
|
|
other-modules:
|
|
Paths_roux_server
|
|
autogen-modules:
|
|
Paths_roux_server
|
|
hs-source-dirs:
|
|
app
|
|
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 -threaded -rtsopts -with-rtsopts=-N
|
|
build-depends:
|
|
aeson
|
|
, base >=4.7 && <5
|
|
, blaze-html
|
|
, blaze-markup
|
|
, bytestring
|
|
, containers
|
|
, directory
|
|
, filepath
|
|
, http-types
|
|
, optparse-applicative
|
|
, parsec
|
|
, roux-server
|
|
, text
|
|
, time
|
|
, unix
|
|
, wai
|
|
, warp
|
|
default-language: Haskell2010
|
|
|
|
test-suite roux-server-test
|
|
type: exitcode-stdio-1.0
|
|
main-is: Spec.hs
|
|
other-modules:
|
|
Roux.NYTimesSpec
|
|
Roux.ParserSpec
|
|
Paths_roux_server
|
|
autogen-modules:
|
|
Paths_roux_server
|
|
hs-source-dirs:
|
|
test
|
|
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
|
|
build-depends:
|
|
aeson
|
|
, base >=4.7 && <5
|
|
, blaze-html
|
|
, blaze-markup
|
|
, bytestring
|
|
, containers
|
|
, directory
|
|
, filepath
|
|
, hspec
|
|
, http-types
|
|
, optparse-applicative
|
|
, parsec
|
|
, roux-server
|
|
, tasty
|
|
, tasty-golden
|
|
, tasty-hspec
|
|
, tasty-hunit
|
|
, text
|
|
, time
|
|
, wai
|
|
, warp
|
|
default-language: Haskell2010
|