bot: Fix empty buttfeed posts, and use requested RSS feed for Habitat.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 17m35s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 17m35s
This commit is contained in:
parent
09ae4e2096
commit
44ebb841f0
@ -13,8 +13,7 @@ args = parser.parse_args()
|
||||
k_feeds = {
|
||||
'tildefriends': 'https://dev.tildefriends.net/cory/tildefriends.rss',
|
||||
'erlbutt': 'https://github.com/cmoid/erlbutt/commits/main.atom',
|
||||
'habitat': 'https://gitlab.com/quickdudley/habitat/-/commits/main.atom',
|
||||
'habitat': 'https://gitlab.com/quickdudley/habitat/-/commits/internet.atom',
|
||||
'habitat': 'https://tildegit.org/jeremylist/habitat.rss',
|
||||
'manyverse': 'https://gitlab.com/staltz/manyverse/-/commits/master?format=atom',
|
||||
'ahau': 'https://gitlab.com/ahau/ahau/-/commits/master.atom',
|
||||
}
|
||||
@ -43,9 +42,9 @@ if args.state_file:
|
||||
pass
|
||||
cutoff = state.get('last_update') or (time.time() - 2 * 7 * 24 * 60 * 60)
|
||||
|
||||
entries = get_entries()
|
||||
entries = [entry for entry in get_entries() if entry[0] > cutoff]
|
||||
if entries:
|
||||
text = '# Recent Secure Scuttlebutt Development Activity\n\n' + '\n'.join([f' * [{entry[1]}] [{entry[3]}]({entry[2]})' for entry in entries if entry[0] > cutoff])
|
||||
text = '# Recent Secure Scuttlebutt Development Activity\n\n' + '\n'.join([f' * [{entry[1]}] [{entry[3]}]({entry[2]})' for entry in entries])
|
||||
state['last_update'] = entries[0][0]
|
||||
if args.state_file:
|
||||
content = json.dumps({'type': 'post', 'text': text, 'mentions': []})
|
||||
|
Loading…
Reference in New Issue
Block a user