A news feed filtering application with a deep OOP inheritance hierarchy implementing strategy and composite design patterns. Includes phrase, time, and logical triggers that compose into complex filter rules, a configuration file parser, and a Tkinter GUI that polls RSS feeds on a background thread.
NewsStory — data class with guid, title, description, link, and publication date.
Trigger— abstract base class defining theevaluate()interfacePhraseTrigger(Trigger)—is_phrase_in()normalizes text (replaces punctuation with spaces, lowercases, splits and rejoins) and checks for consecutive word phrase matchingTitleTrigger(PhraseTrigger)— fires when the title contains the phraseDescriptionTrigger(PhraseTrigger)— fires when the description contains the phraseTimeTrigger(Trigger)— parses date strings to datetime with EST timezoneBeforeTrigger(TimeTrigger)/AfterTrigger(TimeTrigger)— fire based on publication date comparisonNotTrigger(Trigger)— inverts another triggerAndTrigger(Trigger)— logical AND of two triggersOrTrigger(Trigger)— logical OR of two triggers
filter_stories()— filters a list of stories, keeping any story that fires at least one triggerread_trigger_config()— parses a trigger configuration file to build trigger objects declaratively
main_thread() — Tkinter GUI that polls Google/Yahoo RSS feeds every 120 seconds on a background thread and displays filtered stories.