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

Binary file not shown.