webpeel 0.14.6 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/core/browser-fetch.d.ts.map +1 -1
- package/dist/core/browser-fetch.js +75 -8
- package/dist/core/browser-fetch.js.map +1 -1
- package/dist/core/content-pruner.d.ts.map +1 -1
- package/dist/core/content-pruner.js +32 -0
- package/dist/core/content-pruner.js.map +1 -1
- package/dist/core/http-fetch.d.ts +2 -0
- package/dist/core/http-fetch.d.ts.map +1 -1
- package/dist/core/http-fetch.js +12 -0
- package/dist/core/http-fetch.js.map +1 -1
- package/dist/core/json-ld.d.ts +16 -0
- package/dist/core/json-ld.d.ts.map +1 -0
- package/dist/core/json-ld.js +618 -0
- package/dist/core/json-ld.js.map +1 -0
- package/dist/core/markdown.d.ts.map +1 -1
- package/dist/core/markdown.js +24 -0
- package/dist/core/markdown.js.map +1 -1
- package/dist/core/metadata.d.ts.map +1 -1
- package/dist/core/metadata.js +110 -0
- package/dist/core/metadata.js.map +1 -1
- package/dist/core/pipeline.d.ts +8 -0
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +104 -0
- package/dist/core/pipeline.js.map +1 -1
- package/dist/core/quick-answer.d.ts.map +1 -1
- package/dist/core/quick-answer.js +65 -4
- package/dist/core/quick-answer.js.map +1 -1
- package/dist/core/strategies.d.ts.map +1 -1
- package/dist/core/strategies.js +27 -0
- package/dist/core/strategies.js.map +1 -1
- package/dist/mcp/server.js +20 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/server/routes/fetch.d.ts.map +1 -1
- package/dist/server/routes/fetch.js +16 -2
- package/dist/server/routes/fetch.js.map +1 -1
- package/dist/server/routes/mcp.d.ts.map +1 -1
- package/dist/server/routes/mcp.js +32 -1
- package/dist/server/routes/mcp.js.map +1 -1
- package/dist/types.d.ts +22 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON-LD Structured Data Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts and converts JSON-LD (schema.org) data to clean markdown.
|
|
5
|
+
* Handles Recipe, Product, Article, FAQPage, HowTo, Event, LocalBusiness, Review.
|
|
6
|
+
* This is a FIRST-CLASS content source — tried before HTML DOM parsing.
|
|
7
|
+
*/
|
|
8
|
+
import * as cheerio from 'cheerio';
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
// Helpers
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
/** Strip HTML tags from text fields (some sites put HTML in JSON-LD text) */
|
|
13
|
+
function stripHtml(text) {
|
|
14
|
+
if (!text || typeof text !== 'string')
|
|
15
|
+
return '';
|
|
16
|
+
return text.replace(/<[^>]*>/g, '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, ' ').trim();
|
|
17
|
+
}
|
|
18
|
+
/** Extract a string value from an object that may be a string or { name, '@value' } */
|
|
19
|
+
function str(val) {
|
|
20
|
+
if (!val)
|
|
21
|
+
return '';
|
|
22
|
+
if (typeof val === 'string')
|
|
23
|
+
return stripHtml(val);
|
|
24
|
+
if (typeof val === 'object') {
|
|
25
|
+
if (val['@value'])
|
|
26
|
+
return stripHtml(String(val['@value']));
|
|
27
|
+
if (val.name)
|
|
28
|
+
return stripHtml(val.name);
|
|
29
|
+
if (val.text)
|
|
30
|
+
return stripHtml(val.text);
|
|
31
|
+
}
|
|
32
|
+
return stripHtml(String(val));
|
|
33
|
+
}
|
|
34
|
+
/** Extract author name from author field (may be string, object, or array) */
|
|
35
|
+
function authorName(author) {
|
|
36
|
+
if (!author)
|
|
37
|
+
return '';
|
|
38
|
+
if (typeof author === 'string')
|
|
39
|
+
return stripHtml(author);
|
|
40
|
+
if (Array.isArray(author))
|
|
41
|
+
return author.map(a => str(a.name || a)).filter(Boolean).join(', ');
|
|
42
|
+
return str(author.name || author);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse ISO 8601 duration to human-readable string.
|
|
46
|
+
* PT20M → "20 min", PT1H30M → "1 hr 30 min", P2DT3H → "2 days 3 hr"
|
|
47
|
+
*/
|
|
48
|
+
function parseIso8601Duration(duration) {
|
|
49
|
+
if (!duration || typeof duration !== 'string')
|
|
50
|
+
return '';
|
|
51
|
+
// Remove the leading P
|
|
52
|
+
const match = duration.match(/^P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);
|
|
53
|
+
if (!match)
|
|
54
|
+
return duration;
|
|
55
|
+
const days = parseInt(match[1] || '0', 10);
|
|
56
|
+
const hours = parseInt(match[2] || '0', 10);
|
|
57
|
+
const minutes = parseInt(match[3] || '0', 10);
|
|
58
|
+
const seconds = parseInt(match[4] || '0', 10);
|
|
59
|
+
const parts = [];
|
|
60
|
+
if (days)
|
|
61
|
+
parts.push(`${days} day${days > 1 ? 's' : ''}`);
|
|
62
|
+
if (hours)
|
|
63
|
+
parts.push(`${hours} hr`);
|
|
64
|
+
if (minutes)
|
|
65
|
+
parts.push(`${minutes} min`);
|
|
66
|
+
if (seconds && !days && !hours && !minutes)
|
|
67
|
+
parts.push(`${seconds} sec`);
|
|
68
|
+
return parts.join(' ') || duration;
|
|
69
|
+
}
|
|
70
|
+
/** Extract availability from schema.org URL like "https://schema.org/InStock" */
|
|
71
|
+
function parseAvailability(availability) {
|
|
72
|
+
if (!availability)
|
|
73
|
+
return '';
|
|
74
|
+
// Extract just the last part after last / or #
|
|
75
|
+
const last = availability.split(/[/#]/).pop() || availability;
|
|
76
|
+
// Convert CamelCase to space-separated: InStock → In Stock
|
|
77
|
+
return last.replace(/([A-Z])/g, ' $1').trim();
|
|
78
|
+
}
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// Main extractor
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
export function extractJsonLd(html) {
|
|
83
|
+
const $ = cheerio.load(html);
|
|
84
|
+
const scripts = [];
|
|
85
|
+
$('script[type="application/ld+json"]').each((_, el) => {
|
|
86
|
+
try {
|
|
87
|
+
const raw = $(el).html();
|
|
88
|
+
if (!raw)
|
|
89
|
+
return;
|
|
90
|
+
const parsed = JSON.parse(raw);
|
|
91
|
+
// Handle @graph arrays
|
|
92
|
+
if (parsed['@graph']) {
|
|
93
|
+
scripts.push(...parsed['@graph']);
|
|
94
|
+
}
|
|
95
|
+
else if (Array.isArray(parsed)) {
|
|
96
|
+
scripts.push(...parsed);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
scripts.push(parsed);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch { /* skip malformed JSON-LD */ }
|
|
103
|
+
});
|
|
104
|
+
if (scripts.length === 0)
|
|
105
|
+
return null;
|
|
106
|
+
// Try each converter in priority order
|
|
107
|
+
for (const item of scripts) {
|
|
108
|
+
const type = item['@type'];
|
|
109
|
+
if (!type)
|
|
110
|
+
continue;
|
|
111
|
+
const typeStr = Array.isArray(type) ? type[0] : type;
|
|
112
|
+
switch (typeStr) {
|
|
113
|
+
case 'Recipe': {
|
|
114
|
+
const r = convertRecipe(item);
|
|
115
|
+
if (r)
|
|
116
|
+
return r;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 'Product': {
|
|
120
|
+
const r = convertProduct(item);
|
|
121
|
+
if (r)
|
|
122
|
+
return r;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case 'Article':
|
|
126
|
+
case 'NewsArticle':
|
|
127
|
+
case 'BlogPosting':
|
|
128
|
+
case 'TechArticle': {
|
|
129
|
+
const r = convertArticle(item);
|
|
130
|
+
if (r)
|
|
131
|
+
return r;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case 'FAQPage': {
|
|
135
|
+
const r = convertFAQ(item);
|
|
136
|
+
if (r)
|
|
137
|
+
return r;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
case 'HowTo': {
|
|
141
|
+
const r = convertHowTo(item);
|
|
142
|
+
if (r)
|
|
143
|
+
return r;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
case 'Event': {
|
|
147
|
+
const r = convertEvent(item);
|
|
148
|
+
if (r)
|
|
149
|
+
return r;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
case 'LocalBusiness':
|
|
153
|
+
case 'Restaurant':
|
|
154
|
+
case 'Store': {
|
|
155
|
+
const r = convertLocalBusiness(item);
|
|
156
|
+
if (r)
|
|
157
|
+
return r;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case 'Review': {
|
|
161
|
+
const r = convertReview(item);
|
|
162
|
+
if (r)
|
|
163
|
+
return r;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
// ---------------------------------------------------------------------------
|
|
171
|
+
// Converters
|
|
172
|
+
// ---------------------------------------------------------------------------
|
|
173
|
+
function convertRecipe(item) {
|
|
174
|
+
const name = str(item.name);
|
|
175
|
+
const ingredients = Array.isArray(item.recipeIngredient)
|
|
176
|
+
? item.recipeIngredient.map((i) => str(i)).filter(Boolean)
|
|
177
|
+
: [];
|
|
178
|
+
// Require at minimum a name and at least one ingredient
|
|
179
|
+
if (!name || ingredients.length === 0)
|
|
180
|
+
return null;
|
|
181
|
+
// Parse instructions — can be string[], HowToStep[], or HowToSection[]
|
|
182
|
+
const rawInstructions = item.recipeInstructions;
|
|
183
|
+
const instructions = [];
|
|
184
|
+
if (rawInstructions) {
|
|
185
|
+
const list = Array.isArray(rawInstructions) ? rawInstructions : [rawInstructions];
|
|
186
|
+
for (const inst of list) {
|
|
187
|
+
if (typeof inst === 'string') {
|
|
188
|
+
const t = stripHtml(inst);
|
|
189
|
+
if (t)
|
|
190
|
+
instructions.push(t);
|
|
191
|
+
}
|
|
192
|
+
else if (inst['@type'] === 'HowToStep') {
|
|
193
|
+
const t = str(inst.text || inst.name);
|
|
194
|
+
if (t)
|
|
195
|
+
instructions.push(t);
|
|
196
|
+
}
|
|
197
|
+
else if (inst['@type'] === 'HowToSection') {
|
|
198
|
+
// Section with nested steps
|
|
199
|
+
const steps = Array.isArray(inst.itemListElement) ? inst.itemListElement : [];
|
|
200
|
+
for (const step of steps) {
|
|
201
|
+
const t = str(step.text || step.name);
|
|
202
|
+
if (t)
|
|
203
|
+
instructions.push(t);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const description = str(item.description);
|
|
209
|
+
const prepTime = item.prepTime ? parseIso8601Duration(item.prepTime) : '';
|
|
210
|
+
const cookTime = item.cookTime ? parseIso8601Duration(item.cookTime) : '';
|
|
211
|
+
const totalTime = item.totalTime ? parseIso8601Duration(item.totalTime) : '';
|
|
212
|
+
const recipeYield = str(item.recipeYield);
|
|
213
|
+
// Nutrition
|
|
214
|
+
const nutrition = item.nutrition || {};
|
|
215
|
+
const calories = str(nutrition.calories);
|
|
216
|
+
const fat = str(nutrition.fatContent);
|
|
217
|
+
const protein = str(nutrition.proteinContent);
|
|
218
|
+
const carbs = str(nutrition.carbohydrateContent);
|
|
219
|
+
// Rating
|
|
220
|
+
const rating = item.aggregateRating;
|
|
221
|
+
const ratingValue = rating ? str(rating.ratingValue) : '';
|
|
222
|
+
const ratingCount = rating ? str(rating.ratingCount || rating.reviewCount) : '';
|
|
223
|
+
// Author
|
|
224
|
+
const author = authorName(item.author);
|
|
225
|
+
const lines = [];
|
|
226
|
+
lines.push(`# ${name}`);
|
|
227
|
+
lines.push('');
|
|
228
|
+
if (description) {
|
|
229
|
+
lines.push(description);
|
|
230
|
+
lines.push('');
|
|
231
|
+
}
|
|
232
|
+
// Times row
|
|
233
|
+
const timeParts = [];
|
|
234
|
+
if (prepTime)
|
|
235
|
+
timeParts.push(`**Prep Time:** ${prepTime}`);
|
|
236
|
+
if (cookTime)
|
|
237
|
+
timeParts.push(`**Cook Time:** ${cookTime}`);
|
|
238
|
+
if (totalTime)
|
|
239
|
+
timeParts.push(`**Total:** ${totalTime}`);
|
|
240
|
+
if (timeParts.length > 0) {
|
|
241
|
+
lines.push(timeParts.join(' | '));
|
|
242
|
+
}
|
|
243
|
+
const yieldParts = [];
|
|
244
|
+
if (recipeYield)
|
|
245
|
+
yieldParts.push(`**Servings:** ${recipeYield}`);
|
|
246
|
+
if (calories)
|
|
247
|
+
yieldParts.push(`**Calories:** ${calories}`);
|
|
248
|
+
if (yieldParts.length > 0) {
|
|
249
|
+
lines.push(yieldParts.join(' | '));
|
|
250
|
+
}
|
|
251
|
+
if (timeParts.length > 0 || yieldParts.length > 0)
|
|
252
|
+
lines.push('');
|
|
253
|
+
// Ingredients
|
|
254
|
+
lines.push('## Ingredients');
|
|
255
|
+
for (const ing of ingredients) {
|
|
256
|
+
lines.push(`- ${ing}`);
|
|
257
|
+
}
|
|
258
|
+
lines.push('');
|
|
259
|
+
// Instructions
|
|
260
|
+
if (instructions.length > 0) {
|
|
261
|
+
lines.push('## Instructions');
|
|
262
|
+
instructions.forEach((inst, i) => {
|
|
263
|
+
lines.push(`${i + 1}. ${inst}`);
|
|
264
|
+
});
|
|
265
|
+
lines.push('');
|
|
266
|
+
}
|
|
267
|
+
// Nutrition section
|
|
268
|
+
const nutritionParts = [];
|
|
269
|
+
if (calories)
|
|
270
|
+
nutritionParts.push(`Calories: ${calories}`);
|
|
271
|
+
if (fat)
|
|
272
|
+
nutritionParts.push(`Fat: ${fat}`);
|
|
273
|
+
if (protein)
|
|
274
|
+
nutritionParts.push(`Protein: ${protein}`);
|
|
275
|
+
if (carbs)
|
|
276
|
+
nutritionParts.push(`Carbs: ${carbs}`);
|
|
277
|
+
if (nutritionParts.length > 0) {
|
|
278
|
+
lines.push('## Nutrition');
|
|
279
|
+
lines.push(nutritionParts.join(' | '));
|
|
280
|
+
lines.push('');
|
|
281
|
+
}
|
|
282
|
+
// Footer
|
|
283
|
+
const footerParts = [];
|
|
284
|
+
if (author)
|
|
285
|
+
footerParts.push(`Source: ${author}`);
|
|
286
|
+
if (ratingValue) {
|
|
287
|
+
const ratingStr = ratingCount ? `Rating: ${ratingValue}/5 (${ratingCount} reviews)` : `Rating: ${ratingValue}/5`;
|
|
288
|
+
footerParts.push(ratingStr);
|
|
289
|
+
}
|
|
290
|
+
if (footerParts.length > 0) {
|
|
291
|
+
lines.push(`*${footerParts.join(' | ')}*`);
|
|
292
|
+
}
|
|
293
|
+
const content = lines.join('\n').trim();
|
|
294
|
+
return {
|
|
295
|
+
found: true,
|
|
296
|
+
type: 'Recipe',
|
|
297
|
+
content,
|
|
298
|
+
title: name,
|
|
299
|
+
data: item,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function convertProduct(item) {
|
|
303
|
+
const name = str(item.name);
|
|
304
|
+
if (!name)
|
|
305
|
+
return null;
|
|
306
|
+
const description = str(item.description);
|
|
307
|
+
const brand = item.brand ? str(item.brand.name || item.brand) : '';
|
|
308
|
+
const sku = str(item.sku || item.mpn);
|
|
309
|
+
// Handle offers as single object or array (take lowest price)
|
|
310
|
+
let price = '';
|
|
311
|
+
let currency = '';
|
|
312
|
+
let availability = '';
|
|
313
|
+
if (item.offers) {
|
|
314
|
+
const offersArr = Array.isArray(item.offers) ? item.offers : [item.offers];
|
|
315
|
+
let lowestPrice = Infinity;
|
|
316
|
+
let lowestOffer = offersArr[0];
|
|
317
|
+
for (const offer of offersArr) {
|
|
318
|
+
const p = parseFloat(str(offer.price));
|
|
319
|
+
if (!isNaN(p) && p < lowestPrice) {
|
|
320
|
+
lowestPrice = p;
|
|
321
|
+
lowestOffer = offer;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
price = str(lowestOffer.price);
|
|
325
|
+
currency = str(lowestOffer.priceCurrency);
|
|
326
|
+
availability = lowestOffer.availability ? parseAvailability(str(lowestOffer.availability)) : '';
|
|
327
|
+
}
|
|
328
|
+
const rating = item.aggregateRating;
|
|
329
|
+
const ratingValue = rating ? str(rating.ratingValue) : '';
|
|
330
|
+
const ratingCount = rating ? str(rating.reviewCount || rating.ratingCount) : '';
|
|
331
|
+
const lines = [];
|
|
332
|
+
lines.push(`# ${name}`);
|
|
333
|
+
lines.push('');
|
|
334
|
+
if (description) {
|
|
335
|
+
lines.push(description);
|
|
336
|
+
lines.push('');
|
|
337
|
+
}
|
|
338
|
+
if (price) {
|
|
339
|
+
lines.push(`**Price:** ${price}${currency ? ' ' + currency : ''}`);
|
|
340
|
+
}
|
|
341
|
+
if (availability) {
|
|
342
|
+
lines.push(`**Availability:** ${availability}`);
|
|
343
|
+
}
|
|
344
|
+
if (brand) {
|
|
345
|
+
lines.push(`**Brand:** ${brand}`);
|
|
346
|
+
}
|
|
347
|
+
if (ratingValue) {
|
|
348
|
+
const ratingStr = ratingCount ? `${ratingValue}/5 (${ratingCount} reviews)` : `${ratingValue}/5`;
|
|
349
|
+
lines.push(`**Rating:** ${ratingStr}`);
|
|
350
|
+
}
|
|
351
|
+
if (sku) {
|
|
352
|
+
lines.push(`**SKU:** ${sku}`);
|
|
353
|
+
}
|
|
354
|
+
const content = lines.join('\n').trim();
|
|
355
|
+
return {
|
|
356
|
+
found: true,
|
|
357
|
+
type: 'Product',
|
|
358
|
+
content,
|
|
359
|
+
title: name,
|
|
360
|
+
data: item,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function convertArticle(item) {
|
|
364
|
+
const headline = str(item.headline || item.name);
|
|
365
|
+
if (!headline)
|
|
366
|
+
return null;
|
|
367
|
+
const articleBody = str(item.articleBody);
|
|
368
|
+
// If articleBody is missing, return null (let HTML pipeline handle it)
|
|
369
|
+
if (!articleBody)
|
|
370
|
+
return null;
|
|
371
|
+
const author = authorName(item.author);
|
|
372
|
+
const datePublished = str(item.datePublished);
|
|
373
|
+
const dateModified = str(item.dateModified);
|
|
374
|
+
const typeStr = Array.isArray(item['@type']) ? item['@type'][0] : (item['@type'] || 'Article');
|
|
375
|
+
const lines = [];
|
|
376
|
+
lines.push(`# ${headline}`);
|
|
377
|
+
lines.push('');
|
|
378
|
+
const metaParts = [];
|
|
379
|
+
if (author)
|
|
380
|
+
metaParts.push(`By ${author}`);
|
|
381
|
+
if (datePublished)
|
|
382
|
+
metaParts.push(`Published: ${datePublished}`);
|
|
383
|
+
if (dateModified)
|
|
384
|
+
metaParts.push(`Modified: ${dateModified}`);
|
|
385
|
+
if (metaParts.length > 0) {
|
|
386
|
+
lines.push(`*${metaParts.join(' | ')}*`);
|
|
387
|
+
lines.push('');
|
|
388
|
+
}
|
|
389
|
+
lines.push(articleBody);
|
|
390
|
+
const content = lines.join('\n').trim();
|
|
391
|
+
return {
|
|
392
|
+
found: true,
|
|
393
|
+
type: typeStr,
|
|
394
|
+
content,
|
|
395
|
+
title: headline,
|
|
396
|
+
data: item,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function convertFAQ(item) {
|
|
400
|
+
const mainEntity = Array.isArray(item.mainEntity) ? item.mainEntity : [];
|
|
401
|
+
if (mainEntity.length === 0)
|
|
402
|
+
return null;
|
|
403
|
+
const lines = [];
|
|
404
|
+
lines.push('# Frequently Asked Questions');
|
|
405
|
+
lines.push('');
|
|
406
|
+
for (const q of mainEntity) {
|
|
407
|
+
const question = str(q.name);
|
|
408
|
+
const answer = q.acceptedAnswer ? str(q.acceptedAnswer.text) : '';
|
|
409
|
+
if (!question)
|
|
410
|
+
continue;
|
|
411
|
+
lines.push(`## ${question}`);
|
|
412
|
+
if (answer) {
|
|
413
|
+
lines.push(answer);
|
|
414
|
+
}
|
|
415
|
+
lines.push('');
|
|
416
|
+
}
|
|
417
|
+
const content = lines.join('\n').trim();
|
|
418
|
+
if (content.length < 50)
|
|
419
|
+
return null;
|
|
420
|
+
return {
|
|
421
|
+
found: true,
|
|
422
|
+
type: 'FAQPage',
|
|
423
|
+
content,
|
|
424
|
+
title: 'Frequently Asked Questions',
|
|
425
|
+
data: item,
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function convertHowTo(item) {
|
|
429
|
+
const name = str(item.name);
|
|
430
|
+
if (!name)
|
|
431
|
+
return null;
|
|
432
|
+
const description = str(item.description);
|
|
433
|
+
// Collect steps from step or itemListElement
|
|
434
|
+
const stepsRaw = item.step || item.itemListElement || [];
|
|
435
|
+
const steps = [];
|
|
436
|
+
const stepsList = Array.isArray(stepsRaw) ? stepsRaw : [stepsRaw];
|
|
437
|
+
for (const step of stepsList) {
|
|
438
|
+
if (typeof step === 'string') {
|
|
439
|
+
const t = stripHtml(step);
|
|
440
|
+
if (t)
|
|
441
|
+
steps.push(t);
|
|
442
|
+
}
|
|
443
|
+
else if (step['@type'] === 'HowToStep') {
|
|
444
|
+
const t = str(step.text || step.name);
|
|
445
|
+
if (t)
|
|
446
|
+
steps.push(t);
|
|
447
|
+
}
|
|
448
|
+
else if (step['@type'] === 'HowToSection') {
|
|
449
|
+
const nested = Array.isArray(step.itemListElement) ? step.itemListElement : [];
|
|
450
|
+
for (const s of nested) {
|
|
451
|
+
const t = str(s.text || s.name);
|
|
452
|
+
if (t)
|
|
453
|
+
steps.push(t);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
if (steps.length === 0)
|
|
458
|
+
return null;
|
|
459
|
+
const totalTime = item.totalTime ? parseIso8601Duration(item.totalTime) : '';
|
|
460
|
+
const estimatedCost = item.estimatedCost ? str(item.estimatedCost.value || item.estimatedCost) : '';
|
|
461
|
+
const lines = [];
|
|
462
|
+
lines.push(`# ${name}`);
|
|
463
|
+
lines.push('');
|
|
464
|
+
if (description) {
|
|
465
|
+
lines.push(description);
|
|
466
|
+
lines.push('');
|
|
467
|
+
}
|
|
468
|
+
if (totalTime)
|
|
469
|
+
lines.push(`**Total Time:** ${totalTime}`);
|
|
470
|
+
if (estimatedCost)
|
|
471
|
+
lines.push(`**Estimated Cost:** ${estimatedCost}`);
|
|
472
|
+
if (totalTime || estimatedCost)
|
|
473
|
+
lines.push('');
|
|
474
|
+
lines.push('## Steps');
|
|
475
|
+
steps.forEach((step, i) => {
|
|
476
|
+
lines.push(`${i + 1}. ${step}`);
|
|
477
|
+
});
|
|
478
|
+
const content = lines.join('\n').trim();
|
|
479
|
+
return {
|
|
480
|
+
found: true,
|
|
481
|
+
type: 'HowTo',
|
|
482
|
+
content,
|
|
483
|
+
title: name,
|
|
484
|
+
data: item,
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function convertEvent(item) {
|
|
488
|
+
const name = str(item.name);
|
|
489
|
+
if (!name)
|
|
490
|
+
return null;
|
|
491
|
+
const description = str(item.description);
|
|
492
|
+
const startDate = str(item.startDate);
|
|
493
|
+
const endDate = str(item.endDate);
|
|
494
|
+
const location = item.location ? str(item.location.name || item.location.address || item.location) : '';
|
|
495
|
+
const organizer = item.organizer ? str(item.organizer.name || item.organizer) : '';
|
|
496
|
+
const url = str(item.url);
|
|
497
|
+
const lines = [];
|
|
498
|
+
lines.push(`# ${name}`);
|
|
499
|
+
lines.push('');
|
|
500
|
+
if (description) {
|
|
501
|
+
lines.push(description);
|
|
502
|
+
lines.push('');
|
|
503
|
+
}
|
|
504
|
+
if (startDate)
|
|
505
|
+
lines.push(`**Date:** ${startDate}${endDate ? ' – ' + endDate : ''}`);
|
|
506
|
+
if (location)
|
|
507
|
+
lines.push(`**Location:** ${location}`);
|
|
508
|
+
if (organizer)
|
|
509
|
+
lines.push(`**Organizer:** ${organizer}`);
|
|
510
|
+
if (url)
|
|
511
|
+
lines.push(`**URL:** ${url}`);
|
|
512
|
+
const content = lines.join('\n').trim();
|
|
513
|
+
return {
|
|
514
|
+
found: true,
|
|
515
|
+
type: 'Event',
|
|
516
|
+
content,
|
|
517
|
+
title: name,
|
|
518
|
+
data: item,
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
function convertLocalBusiness(item) {
|
|
522
|
+
const name = str(item.name);
|
|
523
|
+
if (!name)
|
|
524
|
+
return null;
|
|
525
|
+
const description = str(item.description);
|
|
526
|
+
const typeStr = Array.isArray(item['@type']) ? item['@type'][0] : (item['@type'] || 'LocalBusiness');
|
|
527
|
+
// Address
|
|
528
|
+
const addr = item.address;
|
|
529
|
+
let address = '';
|
|
530
|
+
if (addr) {
|
|
531
|
+
if (typeof addr === 'string') {
|
|
532
|
+
address = addr;
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
const parts = [addr.streetAddress, addr.addressLocality, addr.addressRegion, addr.postalCode, addr.addressCountry].filter(Boolean);
|
|
536
|
+
address = parts.join(', ');
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
const phone = str(item.telephone);
|
|
540
|
+
const url = str(item.url);
|
|
541
|
+
const priceRange = str(item.priceRange);
|
|
542
|
+
const servesCuisine = item.servesCuisine ? (Array.isArray(item.servesCuisine) ? item.servesCuisine.join(', ') : str(item.servesCuisine)) : '';
|
|
543
|
+
const rating = item.aggregateRating;
|
|
544
|
+
const ratingValue = rating ? str(rating.ratingValue) : '';
|
|
545
|
+
const ratingCount = rating ? str(rating.reviewCount || rating.ratingCount) : '';
|
|
546
|
+
// Hours
|
|
547
|
+
const hours = item.openingHours;
|
|
548
|
+
let hoursStr = '';
|
|
549
|
+
if (hours) {
|
|
550
|
+
hoursStr = Array.isArray(hours) ? hours.join(', ') : str(hours);
|
|
551
|
+
}
|
|
552
|
+
const lines = [];
|
|
553
|
+
lines.push(`# ${name}`);
|
|
554
|
+
lines.push('');
|
|
555
|
+
if (description) {
|
|
556
|
+
lines.push(description);
|
|
557
|
+
lines.push('');
|
|
558
|
+
}
|
|
559
|
+
if (address)
|
|
560
|
+
lines.push(`**Address:** ${address}`);
|
|
561
|
+
if (phone)
|
|
562
|
+
lines.push(`**Phone:** ${phone}`);
|
|
563
|
+
if (url)
|
|
564
|
+
lines.push(`**Website:** ${url}`);
|
|
565
|
+
if (priceRange)
|
|
566
|
+
lines.push(`**Price Range:** ${priceRange}`);
|
|
567
|
+
if (servesCuisine)
|
|
568
|
+
lines.push(`**Cuisine:** ${servesCuisine}`);
|
|
569
|
+
if (hoursStr)
|
|
570
|
+
lines.push(`**Hours:** ${hoursStr}`);
|
|
571
|
+
if (ratingValue) {
|
|
572
|
+
const ratingStr = ratingCount ? `${ratingValue}/5 (${ratingCount} reviews)` : `${ratingValue}/5`;
|
|
573
|
+
lines.push(`**Rating:** ${ratingStr}`);
|
|
574
|
+
}
|
|
575
|
+
const content = lines.join('\n').trim();
|
|
576
|
+
return {
|
|
577
|
+
found: true,
|
|
578
|
+
type: typeStr,
|
|
579
|
+
content,
|
|
580
|
+
title: name,
|
|
581
|
+
data: item,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function convertReview(item) {
|
|
585
|
+
const itemReviewed = item.itemReviewed ? str(item.itemReviewed.name || item.itemReviewed) : '';
|
|
586
|
+
const author = authorName(item.author);
|
|
587
|
+
const reviewBody = str(item.reviewBody);
|
|
588
|
+
if (!reviewBody)
|
|
589
|
+
return null;
|
|
590
|
+
const ratingValue = item.reviewRating ? str(item.reviewRating.ratingValue) : '';
|
|
591
|
+
const bestRating = item.reviewRating ? str(item.reviewRating.bestRating || '5') : '5';
|
|
592
|
+
const datePublished = str(item.datePublished);
|
|
593
|
+
const title = itemReviewed ? `Review: ${itemReviewed}` : (author ? `Review by ${author}` : 'Review');
|
|
594
|
+
const lines = [];
|
|
595
|
+
lines.push(`# ${title}`);
|
|
596
|
+
lines.push('');
|
|
597
|
+
const metaParts = [];
|
|
598
|
+
if (author)
|
|
599
|
+
metaParts.push(`By ${author}`);
|
|
600
|
+
if (ratingValue)
|
|
601
|
+
metaParts.push(`Rating: ${ratingValue}/${bestRating}`);
|
|
602
|
+
if (datePublished)
|
|
603
|
+
metaParts.push(datePublished);
|
|
604
|
+
if (metaParts.length > 0) {
|
|
605
|
+
lines.push(`*${metaParts.join(' | ')}*`);
|
|
606
|
+
lines.push('');
|
|
607
|
+
}
|
|
608
|
+
lines.push(reviewBody);
|
|
609
|
+
const content = lines.join('\n').trim();
|
|
610
|
+
return {
|
|
611
|
+
found: true,
|
|
612
|
+
type: 'Review',
|
|
613
|
+
content,
|
|
614
|
+
title,
|
|
615
|
+
data: item,
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
//# sourceMappingURL=json-ld.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-ld.js","sourceRoot":"","sources":["../../src/core/json-ld.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAUnC,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,6EAA6E;AAC7E,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACjD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACvL,CAAC;AAED,uFAAuF;AACvF,SAAS,GAAG,CAAC,GAAQ;IACnB,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACnD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,QAAQ,CAAC;YAAE,OAAO,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,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