From 785e4c4cf2982bf93f396629e48520b48bc57833 Mon Sep 17 00:00:00 2001 From: Guy Godfroy Date: Thu, 3 Dec 2020 20:50:37 +0100 Subject: [PATCH] not at all --- geminer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geminer.py b/geminer.py index 63bf76c..ec417c3 100755 --- a/geminer.py +++ b/geminer.py @@ -119,7 +119,7 @@ for dirname, subdirlist, mdlist in os.walk('.'): with open(gmi_subpath+"/"+gmifile, 'w') as gmi: gmi.write(gmitext) -posts_meta = sorted(posts_meta, key=lambda p: datetime.strptime(p["date"])) +posts_meta.sort(key=lambda p: datetime.strptime(p["date"], "%Y-%m-%d"), reverse=True) with open(tpl_path+"/index.tpl", 'r') as tpl: template = Template(tpl.read())