From 5cde099328142d63b252774ca4bcec680c60bf5f Mon Sep 17 00:00:00 2001 From: Guy Gregory Date: Fri, 18 Jul 2025 18:47:17 +0100 Subject: [PATCH 1/2] Quote Mermaid node label to fix parse errors Wrapped Mermaid node label in double quotes to fix rendering issue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f08675e..b2b357d 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ It provides both Python and TypeScript implementations, returning structured out ```mermaid flowchart TD - A[User provides product URL or prompt (+ optional image)] --> B(OpenAI Response API: tool calling) + A["User provides product URL or prompt (+ optional image)"] --> B(OpenAI Response API: tool calling) B --> C{Tool: extract_image_url or generate_image} C --> D[Fetch product page HTML or send prompt/image to API] D --> E{Extraction or Generation strategies} From c89cc8f4f2605c4346b13312579661e2fa9f8657 Mon Sep 17 00:00:00 2001 From: Guy Gregory Date: Fri, 18 Jul 2025 19:00:37 +0100 Subject: [PATCH 2/2] Escape `` tag in Mermaid node label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced literal < and > in the “Extract first tag” label with HTML entities (< and >). - Fixed label text spillover with line breaks --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b2b357d..9838be6 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,18 @@ It provides both Python and TypeScript implementations, returning structured out ```mermaid flowchart TD - A["User provides product URL or prompt (+ optional image)"] --> B(OpenAI Response API: tool calling) - B --> C{Tool: extract_image_url or generate_image} - C --> D[Fetch product page HTML or send prompt/image to API] - D --> E{Extraction or Generation strategies} - E -->|og:image| F[Extract from Open Graph meta tag] - E -->|product__media| G[Extract from product__media class] - E -->|first_img| H[Extract first tag] - E -->|prompt| L[Generate from prompt] - E -->|image+prompt| M[Generate from image and prompt] + A["User provides product URL
or prompt (+ optional
image)"] --> B(OpenAI Responses API:
tool calling) + B --> C{Tool: extract_image_url
or generate_image} + C --> D[Fetch product page HTML
or send prompt/image
to API] + D --> E{Extraction or
Generation strategies} + E -->|og:image| F[Extract from Open Graph
meta tag] + E -->|product__media| G[Extract from
product__media class] + E -->|first_img| H["Extract first
<img> tag"] + E -->|prompt| L[Generate from
prompt] + E -->|image+prompt| M[Generate from image
and prompt] F & G & H & L & M --> I[Return structured output] - I --> J[OpenAI returns structured JSON] - J --> K[User receives image_url, source_url, found_method] + I --> J[OpenAI returns
structured JSON] + J --> K[User receives image_url,
source_url, found_method] ``` ## Example Output