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:
@@ -11,6 +11,7 @@ export interface FeedItemTable {
|
||||
published_at: string; // ISO 8601 format
|
||||
content: string | null;
|
||||
summary: string | null;
|
||||
image_url: string | null;
|
||||
created_at: string; // ISO 8601 format
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export async function migrate(db: Kysely<Database>): Promise<void> {
|
||||
.addColumn('published_at', 'varchar(32)', (col) => col.notNull())
|
||||
.addColumn('content', 'text')
|
||||
.addColumn('summary', 'text')
|
||||
.addColumn('image_url', 'varchar(2048)')
|
||||
.addColumn('created_at', 'varchar(32)', (col) => col.notNull().defaultTo('CURRENT_TIMESTAMP'))
|
||||
.execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user