AI Skill Report Card

Compiling Recipe Cookbooks

A-83·Nov 25, 2026·Source: Web
14 / 15

Given a list of recipe URLs or raw recipe text, produce one PDF:

  1. Extract + normalize each recipe into a uniform template
  2. Order recipes (by category, alphabetically, or as specified)
  3. Generate an index page with clickable links to each recipe's page
  4. Render everything to a single PDF
Python
# Recommended stack: markdown -> HTML -> PDF (preserves hyperlinks) # Libraries: requests/BeautifulSoup for scraping, weasyprint or pdfkit for PDF generation import weasyprint def build_cookbook(recipes, output_path="cookbook.pdf"): html = render_index(recipes) + "".join(render_recipe_page(r) for r in recipes) weasyprint.HTML(string=html).write_pdf(output_path)
Recommendation▾
Add an example showing a failure case fixed (e.g., mixed units before/after conversion) for contrast between good and bad outcomes
14 / 15

Progress:

  • Step 1: Gather recipes (scrape URLs or accept pasted text)
  • Step 2: Extract structured data from each recipe
  • Step 3: Normalize into the uniform template
  • Step 4: Assign page order and anchors/IDs
  • Step 5: Build the hyperlinked index page
  • Step 6: Render full HTML to PDF
  • Step 7: Verify links and formatting, deliver file

Step 1: Gather Recipes

  • Accept a list of URLs, pasted text, or files.
  • For URLs, scrape and strip ads/navigation/comments — keep only title, description, ingredients, steps, times, servings, source attribution.
  • Always preserve the source URL/site name for attribution.

Step 2: Extract Structured Data

Pull into a consistent schema per recipe:

{
  "title": str,
  "source": str,       # site name or author
  "source_url": str,
  "category": str,     # e.g. "Breakfast", "Dessert" — infer if missing
  "servings": str,
  "prep_time": str,
  "cook_time": str,
  "ingredients": [str, ...],
  "steps": [str, ...],
  "notes": str          # optional (substitutions, tips)
}

If a field is missing from the source, infer conservatively or label "Not specified" — never fabricate specifics like exact times or quantities.

Step 3: Normalize Formatting

Apply one consistent template to every recipe (see Example 2). Standardize:

  • Units (pick one system: US customary or metric, not mixed)
  • Ingredient list style (quantity first, then item: "2 cups flour")
  • Step numbering (always numbered, imperative voice: "Preheat oven to 350°F.")
  • Heading hierarchy and font/style consistent across all recipes

Step 4: Order and Anchor

  • Default ordering: group by category (Appetizers, Mains, Desserts, etc.), then alphabetically within category — unless the user specifies otherwise.
  • Give each recipe page a unique HTML anchor (id="recipe-slug") matching its title, slugified.

Step 5: Build Index Page

  • First page = "Table of Contents" / Index.
  • Group entries by category with recipe titles as hyperlinks (<a href="#recipe-slug">) jumping to each page.
  • Include page numbers if the PDF engine supports counters (CSS target-counter() in WeasyPrint); otherwise rely on clickable links alone.

Step 6: Render to PDF

  • Use an HTML/CSS → PDF pipeline so internal hyperlinks remain clickable (plain text-to-PDF tools often lose links).
  • Force each recipe to start on a new page: page-break-before: always;.
  • Embed a simple, print-friendly stylesheet (readable font, enough margin, consistent header style).

Step 7: Verify

  • Click every index link in the final PDF to confirm it jumps to the correct page.
  • Check for truncated ingredient lists, broken unit conversions, or missing attribution.
Recommendation▾
Include a concrete end-to-end example with actual rendered index page HTML/output, not just prose description
15 / 20

Example 1: Input: 3 URLs — a pasta recipe, a cookie recipe, a soup recipe. Output: cookbook.pdf with page 1 = index listing "Mains > Garlic Pasta", "Desserts > Chocolate Chip Cookies", "Soups > Tomato Basil Soup", each as a hyperlink; pages 2-4 are the uniformly formatted recipes, each starting fresh and ending with "Source: [site name]".

Example 2: Input: Raw scraped text with inconsistent units and a 500-word life story before the recipe. Output: Normalized block:

Recommendation▾
Provide a fallback approach for when scraping fails or sites block requests (e.g., user must paste text manually)

Category: Desserts | Servings: 24 | Prep: 15 min | Cook: 10 min

Ingredients

  • 2 1/4 cups all-purpose flour
  • 1 cup butter, softened
  • 3/4 cup sugar ...

Instructions

  1. Preheat oven to 375°F.
  2. Cream butter and sugar until fluffy. ...

Source: example.com/chocolate-chip-cookies

(Life story, ads, and site navigation text removed entirely.)
  • Keep one unit system throughout the whole cookbook — convert if sources mix them.
  • Always retain source attribution per recipe (ethical/legal courtesy).
  • Use descriptive, consistent category labels so the index reads cleanly.
  • Make index links and anchors deterministic (slugify titles the same way every time) to avoid broken links on rebuild.
  • When quantities/times are ambiguous in the source, flag with "(approx.)" rather than guessing silently.
  • Don't copy ads, comments, personal anecdotes, or SEO filler into the final recipe text.
  • Don't mix measurement systems within a single recipe.
  • Don't use plain-text PDF conversion for the index — hyperlinks will be lost.
  • Don't skip page-break control — recipes spilling across page boundaries awkwardly looks unprofessional.
  • Don't omit the source — uncredited recipe reproduction is a courtesy and legal issue.
0
Grade A-AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
14/15
Workflow
14/15
Examples
15/20
Completeness
17/20
Format
15/15
Conciseness
13/15