use ordered dictionary
This commit is contained in:
parent
86ebe46376
commit
ec57a59654
@ -1,3 +1,3 @@
|
||||
# bink
|
||||
|
||||
serverless microblogging for tilde.town
|
||||
serverless forum for tilde.town
|
3
bink.py
3
bink.py
@ -4,6 +4,7 @@ import json
|
||||
from glob import glob
|
||||
from time import time_ns
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
|
||||
home = os.path.expanduser("~/.bink")
|
||||
my_user = home.split("/")[2]
|
||||
@ -25,7 +26,7 @@ def post_object(path):
|
||||
def generate_feed():
|
||||
posts = [post_object(path) for path in glob("/home/**/.bink/*")]
|
||||
posts.sort(key=lambda x: x[0])
|
||||
tree = {}
|
||||
tree = OrderedDict()
|
||||
for time, user, path in posts:
|
||||
# try:
|
||||
with open(path, "r") as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user