diff options
-rw-r--r-- | gemfeed.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -109,14 +109,12 @@ def main(): # Add one entry per .gmi file files = find_files(args.n) - latest_update = datetime.datetime.fromtimestamp(0, tz=datetime.timezone.utc) - for filename in files: + for n, filename in enumerate(files): entry = feed.add_entry() populate_entry_from_file(filename, args.base_url, entry) print("Adding {} with title '{}'...".format(filename, entry.title())) - if entry.updated() > latest_update: - latest_update = entry.updated() - feed.updated(latest_update) + if n == 0: + feed.updated(entry.updated()) # Write file feed.atom_file(args.output, pretty=True) |