Exemplo n.º 1
0
Arquivo: render.py Projeto: nxsy/gibe
    def excerpt_html(self):
        if isinstance(self.post, models.DeliciousPost):
            md = markdown.Markdown(extensions=[syntaxhighlighterextension, excerpt_extension, 'footnotes'])
            content = md.convert(self.post.comment)
            return content

        content = self.post.content

        if isinstance(self.post, models.TweetPost):
            content = urlify_tweet(content)

        if isinstance(self.post, models.MarkupPost):
            md = markdown.Markdown(extensions=[syntaxhighlighterextension, excerpt_extension, 'footnotes'])
            content = md.convert(content)
            if md.excerpt:
                content = markdown.etree.tostring(md.excerpt)


        return content
Exemplo n.º 2
0
 def text(self):
     return urlify_tweet(self.status.text)
Exemplo n.º 3
0
 def author_html(self):
     return urlify_tweet('@' + self.author_screen_name)
Exemplo n.º 4
0
Arquivo: render.py Projeto: nxsy/gibe
 def author_html(self):
     return urlify_tweet("@" + self.author)