aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-02-24 09:40:36 +0100
committercedricbonhomme <devnull@localhost>2010-02-24 09:40:36 +0100
commitd91391657b8d994ead70a4d8638c44740ce5c254 (patch)
tree645059e20e4b62204a6f452bcb65438f94921ccb /pyAggr3g470r.py
parentAdded utils.py and lot of improvements. (diff)
downloadnewspipe-d91391657b8d994ead70a4d8638c44740ce5c254.tar.gz
newspipe-d91391657b8d994ead70a4d8638c44740ce5c254.tar.bz2
newspipe-d91391657b8d994ead70a4d8638c44740ce5c254.zip
It is now possible to automatically post an article to your delicious account.
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r--pyAggr3g470r.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 87be077b..d5b6f673 100644
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -8,6 +8,7 @@ __copyright__ = "Copyright (c) 2010 Cedric Bonhomme"
__license__ = "GPLv3"
import os
+import sqlite3
import cherrypy
import ConfigParser
@@ -24,8 +25,10 @@ bindhost = "0.0.0.0"
cherrypy.config.update({ 'server.socket_port': 12556, 'server.socket_host': bindhost})
-path = { '/css/style.css': {'tools.staticfile.on': True, \
+path = {'/css/style.css': {'tools.staticfile.on': True, \
'tools.staticfile.filename':path+'css/style.css'}, \
+ '/css/img/delicious.png': {'tools.staticfile.on': True, \
+ 'tools.staticfile.filename':path+'css/img/delicious.png'}, \
'/var/histogram.png':{'tools.staticfile.on': True, \
'tools.staticfile.filename':path+'var/histogram.png'}}
@@ -254,8 +257,10 @@ class Root:
html += "No description available."
html += """<hr />\n<a href="%s">Complete story</a>\n<br />\n""" % \
(article[3].encode('utf-8'),)
- html += """<a href="http://delicious.com/%s">Delicious</a>""" % \
- (article[3].encode('utf-8'),)
+ html += """<a href="http://delicious.com/post?url=%s&title=%s"
+ rel="noreferrer" target="_blank">\n
+ <img src="/css/img/delicious.png" title="Post on del.iciou.us" /></a>""" % \
+ (article[3].encode('utf-8'), article[2].encode('utf-8'))
html += "<hr />\n" + htmlfooter
return html
bgstack15