1234567891011121314151617 |
- class Tracker:
- def __init__(self,board, words):
- self.known_posts = []
- self.words = words
- self.board = board
- def track(self):
- # for every post in some collection
- for post in collectionofposts:
- # for every word in word list
- for word in self.words:
- # if word in post and post not in known posts
- if word in post and not post.number in self.known_posts:
- # alert
- alert(post)
- # ignore for later
- self.known_posts.append(post.number)
|