Browse Source

use updated as date, and not published. this feed is mainly for libreav.org so we need to be compatible with it

master
Nils 3 years ago
parent
commit
78d23486f3
  1. 7
      atomfeedgen.py

7
atomfeedgen.py

@ -4,6 +4,8 @@
#https://github.com/lkiesow/python-feedgen
#Package in Arch [Communiy] python-feedgen . Not python-feedgenerator
#https://feedgen.kiesow.be/api.entry.html
try:
from zoneinfo import ZoneInfo
except ModuleNotFoundError:
@ -31,7 +33,7 @@ descs = {
}
if (not len(sys.argv) == 4) or not sys.argv[1] in descs or not sys.argv[2].endswith("/CHANGELOG") or not sys.argv[3].endswith("feed.atom"):
raise ValueError("Wrong number or wrong arguments: ./atomfeedgen.py patroneo /home/nils/lss/patroneo/CHANGELOG" "out/patroneo/feed.atom" )
raise ValueError("Wrong number or wrong arguments: ./atomfeedgen.py patroneo /home/nils/lss/patroneo/CHANGELOG out/patroneo/feed.atom" )
project = sys.argv[1]
CHANGELOGFILE = sys.argv[2]
@ -70,7 +72,8 @@ for cl in changelogData.split("\n\n"):
fe.title(f"{project.title()} Version {semVersion}")
#fe.link(href=f"https://laborejo.org/downloads/{project}-{semVersion}.tar.gz")
fe.link(href=f"https://laborejo.org/{project}")
fe.pubDate(isodate)
#fe.pubDate(isodate)
fe.updated(isodate)
fe.rights("GPL3+")
cl = "</li>".join("<li>" + line.lstrip() for line in changelog.split("\n"))

Loading…
Cancel
Save