diff --git a/app/feeds/linux_feed.rb b/app/feeds/linux_feed.rb index 2bf9ad7..35c8a9f 100644 --- a/app/feeds/linux_feed.rb +++ b/app/feeds/linux_feed.rb @@ -1,6 +1,10 @@ require_relative 'feed' class LinuxFeed < Feed + REGEXPS = [ + /linux/i, /debian/i, /ubuntu/i, /\bKDE\b/, /\bGTK\d?\b/ + ] + def feed_id 2 end @@ -18,6 +22,6 @@ def avatar_file end def post_matches?(post) - post.text =~ /linux/i + REGEXPS.any? { |r| post.text =~ r } end end diff --git a/app/feeds/star_wars_feed.rb b/app/feeds/star_wars_feed.rb index 69e4488..d0cb4a4 100644 --- a/app/feeds/star_wars_feed.rb +++ b/app/feeds/star_wars_feed.rb @@ -2,7 +2,9 @@ class StarWarsFeed < Feed REGEXPS = [ - /star ?wars/i, /mandalorian/i, /\bandor\b/i, /\bjedi\b/i, /\bsith\b/i, /\byoda\b/i + /star ?wars/i, /mandalorian/i, /\bandor\b/i, /boba fett/i, /obi[ \-]?wan/i, /\bahsoka\b/, /\bjedi\b/i, + /\bsith\b/i, /\byoda\b/i, /Empire Strikes Back/, /chewbacca/i, /Han Solo/, /darth vader/i, /skywalker/i, + /lightsab(er|re)/i, /clone wars/i ] def feed_id