예제 #1
0
    def matches_post(self, post):
        if post.author != self.mark:
            return False

        if not self.active:
            return False

        # Remove quoted blocks because they don't count.
        content = iss_utils.get_closure_bbc_parser().format(post.content)
        return self.phrase.lower() in content.lower()
예제 #2
0
    def quote_content(self):
        parser = utils.get_closure_bbc_parser()
        body = parser.format(self.content)

        template = '[quote author=%s]\n%s\n[/quote]'
        return template % (self.sender.username, body)
예제 #3
0
    def quote_content(self):
        parser = utils.get_closure_bbc_parser()
        body = parser.format(self.content)

        template = '[quote pk=%d author="%s"]\n%s\n[/quote]'
        return template % (self.pk, self.author.username, body)
예제 #4
0
 def setUp2(self):
     self.cparser = utils.get_closure_bbc_parser()