Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
breezykermo committed May 1, 2021
1 parent 9fa9813 commit f502ee9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def idx(obj, base, overrides):
'description': 'highlights',
}
rss_mapping = {
'link': lambda i: i['href'],
'title': lambda i: i['title'],
'description': lambda i: i['text'],
'link': lambda i: idx(i, 'href', overrides),
'title': lambda i: idx(i, 'html', overrides),
'description': lambda i: idx(i, 'text', overrides),
'pubDate': lambda i: utils.format_datetime(datetime.fromtimestamp(i['time']/1000))
}

Expand Down Expand Up @@ -106,7 +106,7 @@ def gen_html(items):
<body>''']

grouped = defaultdict(list)
for d in data:
for d in items:
grouped[idx(d, 'href', overrides)].append(d)

for href, group in sorted(grouped.items(), key=lambda g: -max([idx(d, 'time', overrides) for d in g[1]])):
Expand Down

0 comments on commit f502ee9

Please sign in to comment.