that oughta do it

This commit is contained in:
nebula 2025-04-24 05:14:30 +00:00
parent 39702014ed
commit 608d13f356

View File

@ -37,7 +37,10 @@ def file_object(path):
return (int(split[-1]), split[2], path)
def generate_feed(before=None, count=200):
posts = [file_object(path) for path in glob("/home/**/.bink/*") if os.path.isfile(path)]
posts = [
file_object(path) for path in glob("/home/**/.bink/*")
if os.path.isfile(path) and not os.path.islink(path)
]
if before:
posts = [post for post in posts if post[0] < before]
posts.sort(key=lambda x: x[0], reverse=True)