169 <td className="px-6 py-4">
170 <div className="flex items-center">
171 {book.imageUrl && (
172 <img
173 src={book.imageUrl}
174 alt={book.title}
175 className="w-12 h-16 object-cover rounded mr-4 flex-shrink-0"
176 onError={(e) => {
177 (e.target as HTMLImageElement).style.display = 'none';
178 }}
179 />
8 for (const book of books) {
9 await sqlite.execute(
10 `INSERT INTO ${TABLE_NAME} (rank, title, author, price, rating, review_count, image_url, product_url, scraped_at)
11 VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
12 [
17 book.rating,
18 book.reviewCount,
19 book.imageUrl,
20 book.productUrl,
21 timestamp
40 rating: row[5] as number,
41 reviewCount: row[6] as number,
42 imageUrl: row[7] as string,
43 productUrl: row[8] as string,
44 scrapedAt: row[9] as string
61 rating: row[5] as number,
62 reviewCount: row[6] as number,
63 imageUrl: row[7] as string,
64 productUrl: row[8] as string,
65 scrapedAt: row[9] as string
13 rating REAL NOT NULL,
14 review_count INTEGER NOT NULL,
15 image_url TEXT NOT NULL,
16 product_url TEXT NOT NULL,
17 scraped_at TEXT NOT NULL,
8 rating: number;
9 reviewCount: number;
10 imageUrl: string;
11 productUrl: string;
12 scrapedAt: string; // ISO date string
21 rating: number;
22 reviewCount: number;
23 imageUrl: string;
24 productUrl: string;
25 scrapedAt: string;
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/frontend/style.css">
8 <link rel="icon" href="/frontend/favicon.svg" type="image/svg+xml">
9 </head>
10 <body>
164 }
165
166 if (metadata.imageLinks) {
167 updateMetadata.imageLinks = metadata.imageLinks;
168 }
169
21 previewLink?: string;
22 infoLink?: string;
23 imageLinks?: string; // Store as JSON string
24 // Status tracking
25 processed?: boolean;
46 previewLink?: string;
47 infoLink?: string;
48 imageLinks?: {
49 smallThumbnail?: string;
50 thumbnail?: string;
250 previewLink: page.properties['Preview Link']?.url,
251 infoLink: page.properties['Info Link']?.url,
252 imageLinks: page.properties['Image Links']?.rich_text?.[0]?.text?.content,
253 processed: page.properties.Processed?.checkbox,
254 lastUpdated: page.properties['Last Updated']?.last_edited_time,
415 }
416
417 if (metadata.imageLinks) {
418 additionalProperties['Image Links'] = {
419 rich_text: [
420 {
421 text: {
422 content: JSON.stringify(metadata.imageLinks)
423 }
424 }
132 }
133
134 if (volumeInfo.imageLinks) {
135 metadata.imageLinks = volumeInfo.imageLinks;
136 }
137
238 canonicalVolumeLink: volumeInfo.canonicalVolumeLink,
239 isbn: isbn,
240 imageLinks: volumeInfo.imageLinks,
241 score: (titleMatch ? 2 : 0) + (authorMatch ? 2 : 0)
242 });
318 }
319
320 if (best.imageLinks) {
321 metadata.imageLinks = best.imageLinks;
322 }
323
41 // New: Replace the title, type and data with a message
42 await sqlite.execute(
43 `UPDATE ${TABLE_NAME} SET title = "Creation deleted by moderator", type = "", data = "", image = "" WHERE id = ?;`,
44 [id],
45 );
46
47 // Also delete the blob!
48 blob.delete("pondiverse_image" + id);
49 blob.delete("pondiverse_data" + id);
50
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/frontend/style.css">
8 <link rel="icon" href="/frontend/favicon.svg" type="image/svg+xml">
9 </head>
10 <body>