use ordered dictionary

This commit is contained in:
nebula 2025-04-20 20:00:38 +00:00
parent 86ebe46376
commit ec57a59654
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,3 @@
# bink
serverless microblogging for tilde.town
serverless forum for tilde.town

View File

@ -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: