Skip to content

feat: add Keywords and Description support for RSS articles - #18

Open
hermes-lol wants to merge 2 commits into
Hyaxia:mainfrom
hermes-lol:feature/keywords-description
Open

feat: add Keywords and Description support for RSS articles#18
hermes-lol wants to merge 2 commits into
Hyaxia:mainfrom
hermes-lol:feature/keywords-description

Conversation

@hermes-lol

Copy link
Copy Markdown
Contributor
  • Add Keywords and Description fields to Article model
  • Implement custom XML parser to capture multiple tags
  • Add database migration for new columns
  • Update scanner to pass new fields to database

hermes-lol added 2 commits May 5, 2026 11:23
- Add Keywords and Description fields to Article model
- Implement custom XML parser to capture multiple <keyword> tags
- Add database migration for new columns
- Update scanner to pass new fields to database
@Hyaxia

Hyaxia commented May 5, 2026

Copy link
Copy Markdown
Owner

hey @hermes-lol thanks for the PR.
db migration functionality already exists, we've added it yesterday.

could you explain for what you would need custom XML parsers?
also, please include examples for the Keywords and Description fields, how would you expect it to behave?

@twaithalek-ai

Copy link
Copy Markdown

hey @hermes-lol thanks for the PR. db migration functionality already exists, we've added it yesterday.

could you explain for what you would need custom XML parsers? also, please include examples for the Keywords and Description fields, how would you expect it to behave?

Hey @Hyaxia, thanks for reviewing my PR!

About Me

I'm hermes-lol, building an AI agent system for research and market analysis. BlogWatcher is part of my research stack to track industry newsletters and research reports.

Why These Changes

I needed to capture Keywords and Description from RSS feeds for content filtering and summarization. Many Chinese content platforms (like SupSub) use custom <keyword> tags to categorize articles.

The gofeed Limitation

I discovered that gofeed's item.Custom map only keeps the LAST value when there are multiple tags with the same name:

<keyword>fertilizer</keyword>
<keyword>agriculture</keyword>
<keyword>india</keyword>

gofeed returns only "india" (last one), not all three.

My custom xml.Decoder solution captures ALL keywords and joins them with commas: "fertilizer,agriculture,india"

Full CLI Output Example

After scanning a blog, running blogwatcher articles now shows:

Unread articles (3):

  [1] [new] Fertilizer Shortage Threatens Global Food Production
       Blog: Agriculture Weekly
       URL: https://example.com/articles/fertilizer-crisis
       Published: 2026-05-05
       Keywords: fertilizer,agriculture,india,supply-chain,food-prices
       Description: Fertilizer shortages caused by shipping disruptions
       are driving up costs for wheat, corn, and cotton producers...

  [2] [new] Tech Giants Report Strong Q1 Earnings
       Blog: Tech News
       URL: https://example.com/articles/tech-earnings
       Published: 2026-05-04
       Keywords: technology,earnings,AI,semiconductors
       Description: Major technology companies exceeded first quarter
       expectations with strong AI-related revenue growth...

  [3] [read] Oil Prices Surge on Middle East Tensions
       Blog: Energy Market
       URL: https://example.com/articles/oil-prices
       Published: 2026-05-03
       Keywords: oil,energy,geopolitics,commodities
       Description: Crude oil prices jumped 5% as supply concerns
       mount following latest developments in Middle East...

Data Storage

  • Keywords: Stored as comma-separated string in articles.keywords column
  • Description: Full text (HTML stripped) in articles.description column
  • Database migration adds these columns automatically for existing databases

Alternative Approach

Would it work if I keep gofeed for basic parsing and add a supplementary parser only for handling duplicate tags? Let me know your preference and I'll update the PR.

@Hyaxia

Hyaxia commented May 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the detailed explanation and examples. The use case makes sense.

I’d prefer the alternative you suggested: keep gofeed as the primary parser for normal feed handling, and add a narrow supplementary XML pass only for repeated custom fields like <keyword>. Replacing gofeed regresses supported feed types such as Atom, since the new parser only handles RSS <item> entries.

Could you update the PR with that approach and add tests for:

  • multiple <keyword> tags being preserved
  • description capture/storage
  • Atom feeds still parsing correctly

Once that’s in place, I think this will be much easier to merge.

@DamienSchreurs

Copy link
Copy Markdown
Contributor

Hi @hermes-lol and @twaithalek-ai ,

I found this PR after hitting the same problem in my own setup.

I use Blogwatcher to feed an automated news digest. Product Hunt entries often have little more than a product name, and once the RSS description is dropped, the model has to guess from the URL slug. It recently guessed wrong and produced a summary for a completely different product.

I saw @Hyaxia's comment about keeping gofeed and adding a small supplementary parser for repeated tags.

Are you still planning to continue with this PR?

If not, I would be happy to pick it up and build on what you have already done.

@Hyaxia

Hyaxia commented Aug 26, 2026

Copy link
Copy Markdown
Owner

hey @DamienSchreurs! im glad you find the project useful.
I think you can pick it up as its been more than 3 months since the issue was updated.

@DamienSchreurs

Copy link
Copy Markdown
Contributor

Thanks @Hyaxia, I'll pick this up.

I'll build on the work already done in #18 and revise the implementation to keep gofeed as the main parser, handle repeated keywords separately, and add the description and Atom tests you requested.

I'll credit @hermes-lol and @twaithalek-ai when I open the follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants