diff options
author | cedricbonhomme <devnull@localhost> | 2011-06-13 15:10:39 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2011-06-13 15:10:39 +0200 |
commit | 966e4a0cb67a739b83031d6dc323f12a1d98356a (patch) | |
tree | 7093ed2801b8e79006f1f0adb1413263cd598588 | |
parent | Added better comments in the code. (diff) | |
download | newspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.tar.gz newspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.tar.bz2 newspipe-966e4a0cb67a739b83031d6dc323f12a1d98356a.zip |
Added support of different POD for diaspora.
-rwxr-xr-x | cfg/pyAggr3g470r.cfg-sample | 4 | ||||
-rwxr-xr-x | pyAggr3g470r.py | 4 | ||||
-rwxr-xr-x | utils.py | 1 |
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&title=%s&notes=%s&v=1&';a=function(){if(!window.open(f+'noui=1&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&title=%s&notes=%s&v=1&';a=function(){if(!window.open(f+'noui=1&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 """ % \ - (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> \n""" % \ @@ -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') |