Import

Import recipes from websites and convert to Cooklang format.

Requires the OPENAI_API_KEY environment variable for conversion to Cooklang. Without the key, you can still download the original recipe content with --skip-conversion. Alternatively, use the cook.md converter.

Usage

cook import [OPTIONS] <URL>

Arguments

ArgumentDescription
<URL>URL of the recipe webpage to import. Works with sites using Recipe Schema.org markup.

Options

OptionDescription
-s, --skip-conversionOutput original recipe data without converting to Cooklang
--metadata <FORMAT>Metadata format: frontmatter (default), json, yaml, none
--metadata-onlyOutput only metadata, no recipe content

Examples

# Import and convert to Cooklang
cook import https://www.bbcgoodfood.com/recipes/chicken-bacon-pasta

# Save to file
cook import https://example.com/recipe &gt; lasagna.cook

# Get raw data without conversion
cook import https://example.com/recipe --skip-conversion

# Extract metadata only as JSON
cook import https://example.com/recipe --metadata-only --metadata json