Skip to content

refactor: introduce shared feed helpers#246

Open
spierenburg wants to merge 1 commit into
mainfrom
refactor/shared-feed-utils
Open

refactor: introduce shared feed helpers#246
spierenburg wants to merge 1 commit into
mainfrom
refactor/shared-feed-utils

Conversation

@spierenburg
Copy link
Copy Markdown
Collaborator

@spierenburg spierenburg commented May 18, 2026

What this PR brings

  • Adds modules/feedutils.py with shared helpers for common feed-module behavior:
    • loading default/override settings
    • converting dict settings to an object-like namespace
    • cleaning and truncating HTML descriptions
  • Migrates the abb and akamai RSS feed modules to use the shared helpers.

Why it matters

Many feed modules duplicate the same settings-loading and description-cleaning logic. That makes behavior drift likely and increases the cost of fixing bugs across feeds.

This PR introduces a small shared utility module and migrates two representative feeds as a safe first step. It keeps behavior equivalent while creating a pattern future PRs can apply incrementally to the rest of the RSS modules.

Validation

python3 -m py_compile modules/feedutils.py modules/abb/feed.py modules/akamai/feed.py

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.

1 participant