nextcloud / nextcloud/cookbook

Recipe instructions in object-form should be importable

Open
#382 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

Imported a recipe from this URL: https://justcook.butcherbox.com/cuts/pork/pork-loin-roast/ , which has the recipe in JSON-LD format embedded in the web page.

Image, name, ingredient list, and cooking time were imported just fine, but instructions are not imported, if one looks at the raw json generated, the "recipeInstructions" is an empty array.

Especially odd because if one looks at the JSON-LD that's in the web page in question, recipeInstructions is clearly a populated array. Problem is likely related to the fact this recipe divides its steps into sections.

For convenience, I used getld and jq to extract and inspect raw json from the original recipe URL in question, like so:

# get CLI tool for extracting JSON-LD from urls
go get github.com/daetal-us/getld

# json swiss army knife
sudo apt-get install jq

# get recipe, format it for human eyeball compatibility.
getld https://justcook.butcherbox.com/cuts/pork/pork-loin-roast/ | jq . > readable-recipe.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the import using the provided recipe URL and inspect the extracted JSON-LD, especially the populated recipeInstructions array and its section structure. Trace the recipe importer entry point that handles JSON-LD; done means object-form instructions are imported into the recipe instead of producing an empty array.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.