Template of a custom feed generator service for the Bluesky network in Ruby

added some more regexps to Star Wars and Linux

Changed files
+8 -2
app
+5 -1
app/feeds/linux_feed.rb
··· 1 1 require_relative 'feed' 2 2 3 3 class LinuxFeed < Feed 4 + REGEXPS = [ 5 + /linux/i, /debian/i, /ubuntu/i, /\bKDE\b/, /\bGTK\d?\b/ 6 + ] 7 + 4 8 def feed_id 5 9 2 6 10 end ··· 18 22 end 19 23 20 24 def post_matches?(post) 21 - post.text =~ /linux/i 25 + REGEXPS.any? { |r| post.text =~ r } 22 26 end 23 27 end
+3 -1
app/feeds/star_wars_feed.rb
··· 2 2 3 3 class StarWarsFeed < Feed 4 4 REGEXPS = [ 5 - /star ?wars/i, /mandalorian/i, /\bandor\b/i, /\bjedi\b/i, /\bsith\b/i, /\byoda\b/i 5 + /star ?wars/i, /mandalorian/i, /\bandor\b/i, /boba fett/i, /obi[ \-]?wan/i, /\bahsoka\b/, /\bjedi\b/i, 6 + /\bsith\b/i, /\byoda\b/i, /Empire Strikes Back/, /chewbacca/i, /Han Solo/, /darth vader/i, /skywalker/i, 7 + /lightsab(er|re)/i, /clone wars/i 6 8 ] 7 9 8 10 def feed_id