Skip to content

Commit

Permalink
added some more regexps to Star Wars and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Jun 29, 2023
1 parent cd52c34 commit e4f39be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/feeds/linux_feed.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,6 +22,6 @@ def avatar_file
end

def post_matches?(post)
post.text =~ /linux/i
REGEXPS.any? { |r| post.text =~ r }
end
end
4 changes: 3 additions & 1 deletion app/feeds/star_wars_feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4f39be

Please sign in to comment.