aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-13 15:10:39 +0200
committercedricbonhomme <devnull@localhost>2011-06-13 15:10:39 +0200
commit966e4a0cb67a739b83031d6dc323f12a1d98356a (patch)
tree7093ed2801b8e79006f1f0adb1413263cd598588
parentAdded better comments in the code. (diff)
downloadnewspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.tar.gz
newspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.tar.bz2
newspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.zip
Added support of different POD for diaspora.
-rwxr-xr-xcfg/pyAggr3g470r.cfg-sample4
-rwxr-xr-xpyAggr3g470r.py4
-rwxr-xr-xutils.py1
3 files changed, 6 insertions, 3 deletions
diff --git a/cfg/pyAggr3g470r.cfg-sample b/cfg/pyAggr3g470r.cfg-sample
index d4b3d6e1..63de4005 100755
--- a/cfg/pyAggr3g470r.cfg-sample
+++ b/cfg/pyAggr3g470r.cfg-sample
@@ -6,4 +6,6 @@ mail_from = pyAggr3g470r@no-reply.com
mail_to = address_of_the_recipient@example.com
smtp = smtp.example.com
username = your_mail_address@example.com
-password = your_password \ No newline at end of file
+password = your_password
+[misc]
+diaspora_pod = joindiaspora.com
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 55f0b2e3..df1c0d23 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -491,9 +491,9 @@ class Root:
# Share this article:
# on Diaspora
- html += """<a href="javascript:(function(){f='https://joindiaspora.com/bookmarklet?url=%s&amp;title=%s&amp;notes=%s&amp;v=1&amp;';a=function(){if(!window.open(f+'noui=1&amp;jump=doclose','diasporav1','location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()">\n\t
+ html += """<a href="javascript:(function(){f='https://%s/bookmarklet?url=%s&amp;title=%s&amp;notes=%s&amp;v=1&amp;';a=function(){if(!window.open(f+'noui=1&amp;jump=doclose','diasporav1','location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()">\n\t
<img src="/css/img/diaspora.png" title="Share on Diaspora" /></a>\n &nbsp;&nbsp; """ % \
- (article.article_link, article.article_title, "via pyAggr3g470r")
+ (utils.DIASPORA_POD, article.article_link, article.article_title, "via pyAggr3g470r")
# on Identi.ca
html += """\n\n<a href="http://identi.ca/index.php?action=newnotice&status_textarea=%s: %s" title="Share on Identi.ca" target="_blank"><img src="/css/img/identica.png" /></a> &nbsp;&nbsp; \n""" % \
diff --git a/utils.py b/utils.py
index d23981f5..506f1de9 100755
--- a/utils.py
+++ b/utils.py
@@ -63,6 +63,7 @@ config.read("./cfg/pyAggr3g470r.cfg")
path = os.path.abspath(".")
sqlite_base = os.path.abspath(config.get('global', 'sqlitebase'))
MAX_NB_ARTICLES = int(config.get('global', 'max_nb_articles'))
+DIASPORA_POD = config.get('misc', 'diaspora_pod')
mail_from = config.get('mail','mail_from')
mail_to = config.get('mail','mail_to')
smtp_server = config.get('mail','smtp')
bgstack15