Skip to content

Import an Umai recipe? #32

@jg10-mastodon-social

Description

@jg10-mastodon-social

I'm trying to import a recipe from one Solid account to another. Changes have been made to the recipe, so I can't just reimport the original website.
I would be ok with adding the remote recipe to the cookbook if it was possible (i.e. one recipe in two cookbooks), but importing is actually preferred in this case.

This was my journey, starting with "Import from the web":

  • Importing directly fails with a 401, because it uses an unauthenticated fetch
    : await fetch(url);
    • In principle it seems a Solid resource could be detected with the header www-authenticate Bearer scope="openid webid"
    • Workaround is to change the resource to being public
  • No recipe is found because parseWebsite expects HTML
  • I used Share -> JSON-LD -> Download and then Upload JSON-LD
    • This mostly worked, though images are hotlinked rather than downloaded, so a private image was not available from the new account
    • Given this works well, perhaps the same function could be used directly on the remote JSON-LD (without having to download)
      const recipe = await Recipe.createFromJsonLD(jsonld);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions