From bf5a1ecc6b9563e67c6dd06834f9d8292c6a32af Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Sat, 3 Jan 2015 22:24:53 +0100 Subject: [PATCH] share_post: add share-to-Diaspora* support This uses the sharetodiaspora.github.io HTML5 posting app, necessary due to Diaspora*'s multi-homed nature. --- README.md | 2 ++ share_post.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9646ef5..0edd3e2 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ Template Example

Share on: + Diaspora* + ❄ TwitterFacebook diff --git a/share_post.py b/share_post.py index db99d5a..b8c1b6a 100644 --- a/share_post.py +++ b/share_post.py @@ -39,12 +39,15 @@ def share_post(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) facebook_link = 'http://www.facebook.com/sharer/sharer.php?s=100&p%%5Burl%%5D=%s' % url gplus_link = 'https://plus.google.com/share?url=%s' % url twitter_link = 'http://twitter.com/home?status=%s' % tweet mail_link = 'mailto:?subject=%s&body=%s' % (title, url) - share_links = {'twitter': twitter_link, + share_links = { + 'diaspora': diaspora_link, + 'twitter': twitter_link, 'facebook': facebook_link, 'google-plus': gplus_link, 'email': mail_link