@@ 479,17 479,24 @@ def feedme(atom: str, rss: str, pretty: bool, inputs):
inputs = (unpickle(open(f, "rb")) for f in inputs)
pairs = ((p, next(inputs)) for p in inputs)
+ # # sort by date descending I guess? I'm not sure it matters
+ # pairs = sorted(pairs, key=lambda postpair: -postpair[0]['date'])
for post, body in pairs:
self = f'{site_url}/{post["rstpath"].parent}'
author = post.get("author") or cfg.site.author
- fe = fg.add_entry()
+ fe = fg.add_entry(order='append')
fe.id(self)
fe.link(href=self)
fe.title(post["title"])
fe.published(post["date"])
if "updated" in post:
fe.updated(post["updated"])
+ else:
+ # `updated(None)` (the default value) uses the current timestamp
+ # that the feed is being generated at ??? so it looks like posts are always
+ # updated??? idk why
+ fe.updated(post["date"])
if author:
fe.author(name=author) # TODO support email?
else: