[GH-ISSUE #1996] Import tags from feed #1242

Closed
opened 2026-03-02 11:56:00 +03:00 by kerem · 2 comments
Owner

Originally created by @teranex on GitHub (Oct 1, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1996

Describe the feature you'd like

Would it be possible when importing from an RSS Feed to (optionally, configured for each feed) add the tags for each item as tags for that bookmark?

Describe the benefits this would bring to existing Karakeep users

It's a feature that could be useful for multiple people i guess

Can the goal of this request already be achieved via other means?

Not that I could find with the current feed import functionality

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

My personal use case for this:
I use Readeck to read articles. Some of them I want in Karakeep as well as bookmarks. To do so I:

  • Mark the article as a favorite in Readeck. Optionally I add some labels (tags) in Readeck
  • In FreshRSS I import the Readeck favorites using the json api(++)
  • In FreshRSS I created a saved query for all the Readeck favorites which makes it available as a feed again, including the tags
  • In Karakeep I subscribe to that feed.
  • When I favorite an article in Readeck it gets added to Karakeep, but without the labels I assigned in Readeck.

(++) Why passing everything through FreshRSS?
Two reasons:

  1. The RSS feed that Readeck makes available requires login, which Karakeep does not support.
  2. The links in the Readeck RSS point to the readeck instance instead of the original articles

So in FreshRSS I created a 'feed' which uses the Readeck json api.

  • FreshRSS has support to use login credentials so that already fixes problem 1
  • By using the json api and transforming that into a feed, then making it available again to the outside world using a saved query, fixes problem 2. Feed is set up as follows:
    • https://readeck.local/api/bookmarks?limit=10&sort=-created&is_marked=1
    • type of feed source: lson (dot notation)
    • dot notation for finding news items: .
    • dot notation for title: title
    • dot notation for content: description
    • dot notation for link: url (this is the link to the original article, while in the original readeck feed it points to the readeck instance itself)
    • dot notation for item tags: labels
    • dot notation for unique ID: id
Originally created by @teranex on GitHub (Oct 1, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1996 ### Describe the feature you'd like Would it be possible when importing from an RSS Feed to (optionally, configured for each feed) add the tags for each item as tags for that bookmark? ### Describe the benefits this would bring to existing Karakeep users It's a feature that could be useful for multiple people i guess ### Can the goal of this request already be achieved via other means? Not that I could find with the current feed import functionality ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### Additional context My personal use case for this: I use Readeck to read articles. Some of them I want in Karakeep as well as bookmarks. To do so I: * Mark the article as a favorite in Readeck. Optionally I add some labels (tags) in Readeck * In FreshRSS I import the Readeck favorites using the json api(++) * In FreshRSS I created a saved query for all the Readeck favorites which makes it available as a feed again, including the tags * In Karakeep I subscribe to that feed. * When I favorite an article in Readeck it gets added to Karakeep, but without the labels I assigned in Readeck. (++) Why passing everything through FreshRSS? Two reasons: 1. The RSS feed that Readeck makes available requires login, which Karakeep does not support. 2. The links in the Readeck RSS point to the readeck instance instead of the original articles So in FreshRSS I created a 'feed' which uses the Readeck json api. * FreshRSS has support to use login credentials so that already fixes problem 1 * By using the json api and transforming that into a feed, then making it available again to the outside world using a saved query, fixes problem 2. Feed is set up as follows: * https://readeck.local/api/bookmarks?limit=10&sort=-created&is_marked=1 * type of feed source: lson (dot notation) * dot notation for finding news items: . * dot notation for title: title * dot notation for content: description * dot notation for link: url (this is the link to the original article, while in the original readeck feed it points to the readeck instance itself) * dot notation for item tags: labels * dot notation for unique ID: id
Author
Owner

@MohamedBassem commented on GitHub (Oct 12, 2025):

@claude Modify the feed table to include a flag of whether to import tags or not. If it's enabled, then we'll read the categories from the feed items and attach them to the bookmarks after creating them. The rss-parser we have contains a categories field for every item that we can use as the tags. While we're at it, let's also read the title from the rss parser.

<!-- gh-comment-id:3394467667 --> @MohamedBassem commented on GitHub (Oct 12, 2025): @claude Modify the feed table to include a flag of whether to import tags or not. If it's enabled, then we'll read the categories from the feed items and attach them to the bookmarks after creating them. The rss-parser we have contains a `categories` field for every item that we can use as the tags. While we're at it, let's also read the title from the rss parser.
Author
Owner

@claude[bot] commented on GitHub (Oct 12, 2025):

Claude finished @MohamedBassem's task —— View jobclaude/issue-1996-20251012-1355Create PR ➔


Completed: RSS feed tag import feature

  • Gather context and examine current implementation
  • Add import_tags flag to feed table schema
  • Generate database migration
  • Find and update feed processing logic to import categories as tags
  • Ensure title is being read from RSS parser
  • Commit and push changes

Changes Implemented

Database Schema (packages/db/schema.ts):

  • Added importTags boolean field to rssFeedsTable (defaults to false)
  • Created migration 0063_add_import_tags_to_feeds.sql

Type Definitions (packages/shared/types/feeds.ts):

  • Updated zFeedSchema to include importTags: z.boolean()
  • Updated zNewFeedSchema to include importTags: z.boolean().optional().default(false)
  • Updated zUpdateFeedSchema to include importTags: z.boolean().optional()

Feed Model (packages/trpc/models/feeds.ts):

  • Updated Feed.create() to handle the importTags field
  • Updated Feed.update() to handle the importTags field

Feed Worker (apps/workers/workers/feedWorker.ts):

  • Updated RSS parser schema to capture title and categories fields
  • Modified bookmark creation to include the title from the feed
  • Added logic to attach RSS feed categories as bookmark tags when importTags is enabled
  • Implemented error handling with warnings if tag attachment fails

How It Works

  1. Feed Configuration: Users can now enable/disable tag import on a per-feed basis using the importTags flag
  2. RSS Parsing: The worker reads both the title and categories from each RSS feed item
  3. Bookmark Creation: When creating bookmarks from feed items:
    • The title from the RSS feed is used if available
    • If importTags is enabled, categories are attached as tags using the updateTags API
  4. Error Handling: If tag attachment fails for any reason, a warning is logged but the bookmark import continues

Testing Notes

⚠️ Important: I was unable to run pnpm typecheck and pnpm lint due to environment restrictions. Please run these commands locally before merging:

pnpm typecheck
pnpm lint

Create Pull Request


Job runBranch

<!-- gh-comment-id:3394468032 --> @claude[bot] commented on GitHub (Oct 12, 2025): **Claude finished @MohamedBassem's task** —— [View job](https://github.com/karakeep-app/karakeep/actions/runs/18444896109) • [`claude/issue-1996-20251012-1355`](https://github.com/karakeep-app/karakeep/tree/claude/issue-1996-20251012-1355) • [Create PR ➔](https://github.com/karakeep-app/karakeep/compare/main...claude/issue-1996-20251012-1355?quick_pull=1&title=feat%28feeds%29%3A%20Add%20import%20tags%20from%20RSS%20feed%20categories&body=Adds%20support%20for%20importing%20tags%20from%20RSS%20feed%20item%20categories.%0A%0A%23%23%20Changes%0A-%20Add%20%60importTags%60%20boolean%20field%20to%20feed%20table%20schema%0A-%20Update%20feed%20processing%20logic%20to%20read%20and%20attach%20categories%20as%20tags%0A-%20Include%20title%20from%20RSS%20parser%20when%20creating%20bookmarks%0A%0AResolves%20%231996%0A%0A%F0%9F%A4%96%20Generated%20with%20%5BClaude%20Code%5D%28https%3A%2F%2Fclaude.com%2Fclaude-code%29) --- ### ✅ Completed: RSS feed tag import feature - [x] Gather context and examine current implementation - [x] Add `import_tags` flag to feed table schema - [x] Generate database migration - [x] Find and update feed processing logic to import categories as tags - [x] Ensure title is being read from RSS parser - [x] Commit and push changes ### Changes Implemented **Database Schema (`packages/db/schema.ts`):** - Added `importTags` boolean field to `rssFeedsTable` (defaults to `false`) - Created migration `0063_add_import_tags_to_feeds.sql` **Type Definitions (`packages/shared/types/feeds.ts`):** - Updated `zFeedSchema` to include `importTags: z.boolean()` - Updated `zNewFeedSchema` to include `importTags: z.boolean().optional().default(false)` - Updated `zUpdateFeedSchema` to include `importTags: z.boolean().optional()` **Feed Model (`packages/trpc/models/feeds.ts`):** - Updated `Feed.create()` to handle the `importTags` field - Updated `Feed.update()` to handle the `importTags` field **Feed Worker (`apps/workers/workers/feedWorker.ts`):** - Updated RSS parser schema to capture `title` and `categories` fields - Modified bookmark creation to include the `title` from the feed - Added logic to attach RSS feed categories as bookmark tags when `importTags` is enabled - Implemented error handling with warnings if tag attachment fails ### How It Works 1. **Feed Configuration**: Users can now enable/disable tag import on a per-feed basis using the `importTags` flag 2. **RSS Parsing**: The worker reads both the title and categories from each RSS feed item 3. **Bookmark Creation**: When creating bookmarks from feed items: - The title from the RSS feed is used if available - If `importTags` is enabled, categories are attached as tags using the `updateTags` API 4. **Error Handling**: If tag attachment fails for any reason, a warning is logged but the bookmark import continues ### Testing Notes ⚠️ **Important**: I was unable to run `pnpm typecheck` and `pnpm lint` due to environment restrictions. Please run these commands locally before merging: ```bash pnpm typecheck pnpm lint ``` ### Create Pull Request --- [Job run](https://github.com/karakeep-app/karakeep/actions/runs/...) • [Branch](https://github.com/karakeep-app/karakeep/tree/claude/issue-1996-20251012-1355)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1242
No description provided.