comparison newsfeed.py @ 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
comparison
equal deleted inserted replaced
137:d3291e4150a2 138:c791f4e9be39
45 oa("<li>") 45 oa("<li>")
46 46
47 if len(content) >= max_length: 47 if len(content) >= max_length:
48 oa(content[:(max_length-opacity75)]) 48 oa(content[:(max_length-opacity75)])
49 oa("<a href="+item["actor"]["url"]+">") 49 oa("<a href="+item["actor"]["url"]+">")
50 #oa("<a href="+item["object"]["url"]+">")
51 oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">') 50 oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">')
52 oa(content[(max_length-opacity75):(max_length-ocacity50)]) 51 oa(content[(max_length-opacity75):(max_length-ocacity50)])
53 oa('</span>') 52 oa('</span>')
54 oa('<span style="opacity: 0.50;filter:Alpha(opacity=50)">') 53 oa('<span style="opacity: 0.50;filter:Alpha(opacity=50)">')
55 oa(content[(max_length-ocacity50):(max_length)]) 54 oa(content[(max_length-ocacity50):(max_length)])
57 else: 56 else:
58 oa(content) 57 oa(content)
59 58
60 oa('<br>') 59 oa('<br>')
61 actor = item["actor"] 60 actor = item["actor"]
62 #oa("<a href="+item["object"]["links"]["self"]["href"]+">more...</a>") 61 oa('<div style="font-size:smaller">')
63 oa('<span style="font-size:smaller>') 62 oa('<a href="%s">%s</a>' % (actor["url"], actor["displayName"]+'</a>'))
64 oa('<a href="'+actor["url"]+'">'+actor["displayName"]+'</a>')
65 #oa(item["content"])
66 if verb == "share": 63 if verb == "share":
67 oa(' via <a href="'+item["object"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a><br>') 64 oa(' via <a href="%s">%s</a><br>' % (item["object"]["url"], item["object"]["author"]["displayName"]))
68 #if verb == "share":
69 # oa(' via <a href="'+item["object"]["author"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a>')
70 65
71 # 2014-01-03T10:30:02Z
72 date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ") 66 date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ")
73 oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date)) 67 oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date))
74 oa('</span>') 68 oa('</div>')
75 oa('<br>')
76 oa("</li>") 69 oa("</li>")
77 70
78 oa("</ul>") 71 oa("</ul>")
79 #oa('<a href="'+data["author"]["url"]+'">mehr von '+data["author"]["displayName"]+'</a>' )
80 body = ''.join(output) 72 body = ''.join(output)
81 73
82 print "Content-Type: text/html;charset=utf-8" 74 print "Content-Type: text/html;charset=utf-8"
83 print 75 print
84 print body 76 print body
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)