update script
This commit is contained in:
parent
7aa87aa4e8
commit
6508463483
@ -110,7 +110,6 @@ class RepoRSS:
|
|||||||
etbobj.end('generator')
|
etbobj.end('generator')
|
||||||
# end generator
|
# end generator
|
||||||
|
|
||||||
rfc822_format = "%a, %d %b %Y %X GMT"
|
|
||||||
changelog_format = "%a, %d %b %Y GMT"
|
changelog_format = "%a, %d %b %Y GMT"
|
||||||
for package in packages:
|
for package in packages:
|
||||||
package_hex = binascii.hexlify(package.chksum[1]).decode()
|
package_hex = binascii.hexlify(package.chksum[1]).decode()
|
||||||
@ -130,10 +129,10 @@ class RepoRSS:
|
|||||||
if count > 3:
|
if count > 3:
|
||||||
changelog += '...'
|
changelog += '...'
|
||||||
break
|
break
|
||||||
date = meta['timestamp'].strftime(changelog_format)
|
cl_date = meta['timestamp'].strftime(changelog_format)
|
||||||
author = meta['author']
|
author = meta['author']
|
||||||
desc = meta['text']
|
desc = meta['text']
|
||||||
changelog += f'{date} - {author}\n{desc}\n\n'
|
changelog += f'{cl_date} - {author}\n{desc}\n\n'
|
||||||
description = f'<p><strong>{package.name}</strong> - {package.summary}</p>\n\n'
|
description = f'<p><strong>{package.name}</strong> - {package.summary}</p>\n\n'
|
||||||
description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % description.replace("\n", "<br />\n")
|
description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % description.replace("\n", "<br />\n")
|
||||||
description += f'<pre>{changelog}</pre>'
|
description += f'<pre>{changelog}</pre>'
|
||||||
@ -147,7 +146,7 @@ class RepoRSS:
|
|||||||
# end title
|
# end title
|
||||||
# start pubDate
|
# start pubDate
|
||||||
etbobj.start('pubDate', {})
|
etbobj.start('pubDate', {})
|
||||||
etbobj.data(date)
|
etbobj.data(time.strftime(rfc822_format, date))
|
||||||
etbobj.end('pubDate')
|
etbobj.end('pubDate')
|
||||||
# end pubDate
|
# end pubDate
|
||||||
# start guid
|
# start guid
|
||||||
|
Loading…
Reference in New Issue
Block a user