Add CLI entry point, RSS content extraction, and image support

Features:
- Add CLI with commands: start, add, remove, list, fetch, status, items
- Auto-detect RSS format when adding feeds
- Auto-run database migrations on startup
- Extract full HTML content from RSS description field (NOS-style feeds)
- Extract image URLs from RSS enclosure tags
- Display images in terminal output with emoji
- Include imageUrl in JSON formatter output

Database:
- Add image_url column to feed_items table
- Update storage layer to persist imageUrl field

Tests:
- Add 10 CLI integration tests
- Add 3 RSS parser tests for image/content extraction
- Add 2 storage tests for imageUrl persistence

Dependencies:
- Add commander for CLI framework

All 144 tests passing
This commit is contained in:
Edo Limburg
2026-05-05 23:05:30 +02:00
parent 78a2b27f6d
commit c79eb6d76d
14 changed files with 825 additions and 4 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ interface JsonFeedItem {
publishedAt: string;
content?: string;
summary?: string;
imageUrl?: string;
}
export class JsonFormatter {
@@ -19,7 +20,8 @@ export class JsonFormatter {
url: item.url,
publishedAt: item.publishedAt.toISOString(),
...(item.content !== undefined && { content: item.content }),
...(item.summary !== undefined && { summary: item.summary })
...(item.summary !== undefined && { summary: item.summary }),
...(item.imageUrl !== undefined && { imageUrl: item.imageUrl })
}));
return JSON.stringify(jsonItems, null, 2);
+4
View File
@@ -23,6 +23,10 @@ export class TerminalFormatter {
lines.push(` ${this.dim(truncated)}`);
}
if (item.imageUrl) {
lines.push(` ${this.dim('📷')} ${this.dim(this.truncate(item.imageUrl, 70))}`);
}
lines.push('');
});