[PATCH] More tweaks in newsfeed output
Wald Commits
scm-commit at wald.intevation.org
Thu Apr 3 16:30:23 CEST 2014
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1396535409 -7200
# Node ID c791f4e9be390c77df9ec944305079dd2cf30ff3
# Parent d3291e4150a21a83bc600fad0c08fdce0a5496ba
More tweaks in newsfeed output.
diff -r d3291e4150a2 -r c791f4e9be39 newsfeed.py
--- 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"
More information about the Dive4Elements-commits
mailing list