Skip to content

Commit

Permalink
Revert "share_post: Don't read summary as it's not used anywhere"
Browse files Browse the repository at this point in the history
This reverts commit 7c097d6699cff6aef0a08336cf5914f64e2bf2bd.

Closes #549
  • Loading branch information
davidmarquis authored and justinmayer committed Sep 13, 2015
1 parent 5f6b44a commit c4351fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions share_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ def article_url(content):
return quote(('%s/%s' % (site_url, content.url)).encode('utf-8'))


def article_summary(content):
return quote(BeautifulSoup(content.summary, 'html.parser').get_text().strip().encode('utf-8'))


def share_post(content):
if isinstance(content, contents.Static):
return
title = article_title(content)
url = article_url(content)
summary = article_summary(content)

tweet = ('%s%s%s' % (title, quote(' '), url)).encode('utf-8')
diaspora_link = 'https://sharetodiaspora.github.io/?title=%s&url=%s' % (title, url)
Expand Down

0 comments on commit c4351fe

Please sign in to comment.