changeset 138:c791f4e9be39

More tweaks in newsfeed output.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 03 Apr 2014 16:30:09 +0200
parents d3291e4150a2
children e17f0122ca94
files newsfeed.py
diffstat 1 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/newsfeed.py	Thu Apr 03 16:20:36 2014 +0200
+++ b/newsfeed.py	Thu Apr 03 16:30:09 2014 +0200
@@ -47,7 +47,6 @@
     if len(content) >= max_length:
         oa(content[:(max_length-opacity75)])
         oa("<a href="+item["actor"]["url"]+">")
-        #oa("<a href="+item["object"]["url"]+">")
         oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">')
         oa(content[(max_length-opacity75):(max_length-ocacity50)])
         oa('</span>')
@@ -59,24 +58,17 @@
 
     oa('<br>')
     actor = item["actor"]
-    #oa("<a href="+item["object"]["links"]["self"]["href"]+">more...</a>")
-    oa('<span style="font-size:smaller>')
-    oa('<a href="'+actor["url"]+'">'+actor["displayName"]+'</a>')
-    #oa(item["content"])
+    oa('<div style="font-size:smaller">')
+    oa('<a href="%s">%s</a>' % (actor["url"], actor["displayName"]+'</a>'))
     if verb == "share":
-        oa(' via <a href="'+item["object"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a><br>')
-    #if verb == "share":
-    #   oa(' via <a href="'+item["object"]["author"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a>')
+        oa(' via <a href="%s">%s</a><br>' % (item["object"]["url"], item["object"]["author"]["displayName"]))
 
-    # 2014-01-03T10:30:02Z
     date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ")
     oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date))
-    oa('</span>')
-    oa('<br>')
+    oa('</div>')
     oa("</li>")
 
 oa("</ul>")
-#oa('<a href="'+data["author"]["url"]+'">mehr von '+data["author"]["displayName"]+'</a>' )
 body = ''.join(output)
 
 print "Content-Type: text/html;charset=utf-8"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)