mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
share_post: Don't read summary as it's not used anywhere
Related to issue #314.
This commit is contained in:
parent
d9a96f1b9b
commit
5f6b44a973
1 changed files with 0 additions and 5 deletions
|
|
@ -27,16 +27,11 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue