forked from endorphant/ttbp
feed publishing tweak
changing feed publishing to report absolute instead of relative timestampmaster
parent
fecb5b9907
commit
1ff8fe39cd
|
@ -567,15 +567,14 @@ def www_neighbors(users):
|
||||||
if core.valid(filename):
|
if core.valid(filename):
|
||||||
lastfile = os.path.join("/home", user, ".ttbp", "entries", filename)
|
lastfile = os.path.join("/home", user, ".ttbp", "entries", filename)
|
||||||
|
|
||||||
ago = "never"
|
|
||||||
if lastfile:
|
if lastfile:
|
||||||
last = os.path.getctime(lastfile)
|
last = os.path.getctime(lastfile)
|
||||||
since = time.time()-last
|
timestamp = time.strftime("%Y-%m-%d at %H:%M", time.localtime(last))
|
||||||
ago = util.pretty_time(int(since)) + " ago"
|
|
||||||
else:
|
else:
|
||||||
|
timestamp = ""
|
||||||
last = 0
|
last = 0
|
||||||
|
|
||||||
userList.append(["<a href=\""+url+"\">~"+user+"</a> ("+ago+")", last])
|
userList.append(["<a href=\""+url+"\">~"+user+"</a> "+timestamp, last])
|
||||||
|
|
||||||
# sort user by most recent entry
|
# sort user by most recent entry
|
||||||
userList.sort(key = lambda userdata:userdata[1])
|
userList.sort(key = lambda userdata:userdata[1])
|
||||||
|
|
Loading…
Reference in New Issue