[PATCH 2 of 2] Merged

Wald Commits scm-commit at wald.intevation.org
Fri Apr 4 08:18:48 CEST 2014


# HG changeset patch
# User Ariane Broermann <ariane at intevation.de>
# Date 1396592261 -7200
# Node ID c7fa55d11493baf32543ca5b67233b165da48a02
# Parent  dac81e04d628d9f59e87f13d466b627aad70e0e0
# Parent  e209a6446e8871905976a8010eeaa7850d9de450
Merged.

diff -r dac81e04d628 -r c7fa55d11493 newsfeed.py
--- a/newsfeed.py	Fri Apr 04 08:17:19 2014 +0200
+++ b/newsfeed.py	Fri Apr 04 08:17:41 2014 +0200
@@ -43,11 +43,11 @@
     postcount += 1
     content = content.encode('utf8')
     oa("<li>")
+    oa('<div style="margin-bottom:1em">')
 
     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>')
@@ -57,25 +57,19 @@
     else:
         oa(content)
 
-    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>')
-    #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('</div>')
+    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"


More information about the Dive4Elements-commits mailing list