Add changelog support to rss feeder

This commit is contained in:
Louis Abel 2023-09-05 00:54:53 -07:00
parent 29a304d34b
commit 3ff9e5e0a7
Signed by untrusted user: label
GPG key ID: B37E62D143879B36
2 changed files with 5 additions and 3 deletions

View file

@ -100,7 +100,7 @@ class RepoRSS:
link = package.remote_location()
item.newChild(None, 'link', self.xmlescape(link))
changelog = ''
cnt = 0
count = 0
if package.changelogs is not None:
changelog_list = package.changelogs
else:
@ -110,8 +110,9 @@ class RepoRSS:
if count > 3:
changelog += '...'
break
(date, author, desc) = meta
date = time.strftime(changelog_format, time.gmtime(float(date)))
date = meta['timestamp'].strftime(changelog_format)
author = meta['author']
desc = meta['text']
changelog += f'{date} - {author}\n{desc}\n\n'
# pylint: disable=line-too-long,consider-using-f-string
description = '<p><strong>{}</strong> - {}</p>\n\n'.format(self.xmlescape(package.name), self.xmlescape(package.summary))
@ -189,6 +190,7 @@ def main(options):
repoobj.disable()
else:
repoobj.enable()
repoobj.load_metadata_other = True
print('Getting repo data')
try:

Binary file not shown.